]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/97626 - handle SCCs properly in SLP stmt analysis
authorRichard Biener <rguenther@suse.de>
Fri, 30 Oct 2020 10:26:18 +0000 (11:26 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 30 Oct 2020 11:28:42 +0000 (12:28 +0100)
commit33c0f246f799b7403171e97f31276a8feddd05c9
treedcefa6830ca686873ca6eb113d6b45402c282517
parent5cafae2c5baf161d4cff83a5d089952fb9d3b7d3
tree-optimization/97626 - handle SCCs properly in SLP stmt analysis

This makes sure to roll-back the whole SCC when we fail stmt
analysis, otherwise the optimistic visited treatment breaks down
with different entries.  Rollback is easy when tracking additions
to visited in a vector which also makes the whole thing cheaper
than the two hash-sets used before.

2020-10-30  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97626
* tree-vect-slp.c (vect_slp_analyze_node_operations):
Exchange the lvisited hash-set for a vector, roll back
recursive adds to visited when analysis failed.
(vect_slp_analyze_operations): Likewise.

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