tree-optimization/97307 - improve sinking of loads
authorRichard Biener <rguenther@suse.de>
Wed, 7 Oct 2020 08:42:12 +0000 (10:42 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 7 Oct 2020 14:55:33 +0000 (16:55 +0200)
commitdae673abd37d400408959497e50fe1f3fbef5533
tree2e35816a5dae16baaaf334b5cb1013b54e24cdfb
parent592fe221735bdaa375b1834dd49ce125d0b600d8
tree-optimization/97307 - improve sinking of loads

This improves the heuristics finding a sink location for loads that does
not cross any store.

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

PR tree-optimization/97307
* tree-ssa-sink.c (statement_sink_location): Change heuristic
for not skipping stores to look for virtual definitions
rather than uses.

* gcc.dg/tree-ssa/ssa-sink-17.c: New testcase.
* gcc.dg/vect/pr65947-3.c: XFAIL.
gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-17.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-3.c
gcc/tree-ssa-sink.c