]> git.ipfire.org Git - thirdparty/gcc.git/commit
vect: Don't update inits for simd_lane_access DRs [PR102789]
authorKewen Lin <linkw@linux.ibm.com>
Tue, 26 Oct 2021 02:05:02 +0000 (21:05 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Mon, 8 Nov 2021 03:08:51 +0000 (21:08 -0600)
commit4f024c99a05f1c6852d1e5daad4a172f4cdd24a1
tree9fd141f7afee73741348d645b327fcacbcd7d06e
parentad96f70c6c485edf8fede8c4ad2ddc2b9f99cee8
vect: Don't update inits for simd_lane_access DRs [PR102789]

As PR102789 shows, when vectorizer does some peelings for alignment
in prologues, function vect_update_inits_of_drs would update the
inits of some drs.  But as the failed case, we shouldn't update the
dr for simd_lane_access, it has the fixed-length storage mainly for
the main loop, the update can make the access out of bound and access
the unexpected element.

gcc/ChangeLog:

PR tree-optimization/102789
* tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
update inits of simd_lane_access.

(cherry picked from commit f3dbd3f36d55178d0a9e4431043cbc950524969a)
gcc/tree-vect-loop-manip.c