]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add missing alignment checks in epilogue loop vectorisation (PR 86877)
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 20 Sep 2018 12:58:16 +0000 (12:58 +0000)
committerRichard Biener <rguenther@suse.de>
Tue, 4 May 2021 12:13:26 +0000 (14:13 +0200)
commitf2ca2b4e23eed2bc0249c7e9dcea4d62b6a04a20
treeca4595d372184e51c2792b7c87459a6c426dca87
parentd884fba07f0ba6e9d8fb6c02b069996a147b54f4
Add missing alignment checks in epilogue loop vectorisation (PR 86877)

Epilogue loop vectorisation skips vect_enhance_data_refs_alignment
since it doesn't make sense to version or peel the epilogue loop
(that will already have happened for the main loop).  But this means
that it also fails to check whether the accesses are suitably aligned
for the new vector subarch.

We don't seem to carry alignment information from the (potentially
peeled or versioned) main loop to the epilogue loop, which would be
good to fix at some point.  I think we want this patch regardless,
since there's no guarantee that the alignment requirements are the
same for every subarch.

2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR tree-optimization/86877
* tree-vect-loop.c (vect_analyze_loop_2): Call
vect_verify_datarefs_alignment.

gcc/testsuite/
PR tree-optimization/86877
* gfortran.dg/vect/vect-8-epilogue.F90: New test.

(cherry picked from commit 508a909eca536f7f6a60af9bd7ecea761bd2e8f1)
gcc/testsuite/gfortran.dg/vect/vect-8-epilogue.F90 [new file with mode: 0644]
gcc/tree-vect-loop.c