tree-optimization/105618 - restore load sinking
authorRichard Biener <rguenther@suse.de>
Tue, 17 May 2022 07:45:02 +0000 (09:45 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 17 May 2022 08:45:45 +0000 (10:45 +0200)
commitebce0e9bd8d714a8607ae24331a3d842b0d11859
tree6717967b3c1211de56e2ea4c7fdf6e4c3faf84e2
parent33400df641d834ca3fd3f2c964ed92759f128ffa
tree-optimization/105618 - restore load sinking

The PR97330 fix caused some missed sinking of loads out of loops
the following patch re-instantiates.

2022-05-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/105618
* tree-ssa-sink.cc (statement_sink_location): For virtual
PHI uses ignore those defining the used virtual operand.

* gcc.dg/tree-ssa/ssa-sink-19.c: New testcase.
gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-19.c [new file with mode: 0644]
gcc/tree-ssa-sink.cc