]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/100253 - fix bogus aligned vectorized loads/stores
authorRichard Biener <rguenther@suse.de>
Thu, 29 Apr 2021 09:52:08 +0000 (11:52 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 29 Apr 2021 09:55:12 +0000 (11:55 +0200)
commitaf4ccaa7515b8e72449448c509916575831e6292
treeee7992b6ec100baca95eeaf5b04c28a6dee4e9df
parent62a44a9797edce11b1f7051ea0016ee975d41233
tree-optimization/100253 - fix bogus aligned vectorized loads/stores

At some point DR_MISALIGNMENT was supposed to be -1 when the
access was not element aligned.  That's obviously not true at this
point so this adjusts both store and load vectorizing to no longer
assume this which in turn allows simplifying the code.

2021-04-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/100253
* tree-vect-stmts.c (vectorizable_load): Do not assume
element alignment when DR_MISALIGNMENT is -1.
(vectorizable_store): Likewise.

* g++.dg/pr100253.C: New testcase.
gcc/testsuite/g++.dg/pr100253.C [new file with mode: 0644]
gcc/tree-vect-stmts.c