Add missing alignment checks in epilogue loop vectorisation (PR 86877)
commit2d974ea15c9e1cb7fef5ca725a15ccd4e13c7e1d
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Sep 2018 12:58:16 +0000 (20 12:58 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Sep 2018 12:58:16 +0000 (20 12:58 +0000)
tree7a689b08a7547223d500131fe82abd0fef4ebbfc
parent51481b252ffe30a1daea491f62c687333efabc40
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264439 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/vect/vect-8-epilogue.F90 [new file with mode: 0644]
gcc/tree-vect-loop.c