tree-optimization/97678 - fix SLP induction epilogue vectorization
authorRichard Biener <rguenther@suse.de>
Tue, 3 Nov 2020 08:53:11 +0000 (09:53 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 3 Nov 2020 08:56:40 +0000 (09:56 +0100)
commitf53e9d40de7212413b361758d66aafb833173dd9
tree344ff015118255a0f995d91c1b975dba80207786
parent0caf400a865cb771f76bf1025cfc2a83e8ef00ed
tree-optimization/97678 - fix SLP induction epilogue vectorization

This restores not tracking SLP nodes for induction initial values
in not nested context because this interferes with peeling and
epilogue vectorization.

2020-11-03  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97678
* tree-vect-slp.c (vect_build_slp_tree_2): Do not track
the initial values of inductions when not nested.
* tree-vect-loop.c (vectorizable_induction): Look at
PHI node initial values again for SLP and not nested
inductions.  Handle LOOP_VINFO_MASK_SKIP_NITERS and cost
invariants.

* gcc.dg/vect/pr97678.c: New testcase.
gcc/testsuite/gcc.dg/vect/pr97678.c [new file with mode: 0644]
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c