tree-optimization/101105 - fix runtime alias test optimization
authorRichard Biener <rguenther@suse.de>
Wed, 23 Jun 2021 10:43:03 +0000 (12:43 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 24 Jun 2021 07:07:05 +0000 (09:07 +0200)
commit50374fdacbd121bc4a61b073e559208ff61bee06
tree803bc4ed31c46913877ae542f8dc58561347e83c
parent3bd86940c428de9dde53e41265fb1435ed236f5e
tree-optimization/101105 - fix runtime alias test optimization

We were ignoring DR_STEP for VF == 1 which is OK only in case
the scalar order is preserved or both DR steps are the same.

2021-06-23  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101105
* tree-vect-data-refs.c (vect_prune_runtime_alias_test_list):
Only ignore steps when they are equal or scalar order is preserved.

* gcc.dg/torture/pr101105.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr101105.c [new file with mode: 0644]
gcc/tree-vect-data-refs.c