re PR tree-optimization/79725 (Sinking opportunity missed if blocked by dead stmt)
authorRichard Biener <rguenther@suse.de>
Mon, 24 Apr 2017 07:48:47 +0000 (07:48 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 24 Apr 2017 07:48:47 +0000 (07:48 +0000)
commit4c7c437cb1c851c54b991cb0d6da3c7c53900e3c
tree7d7d028c48ecd3806a7a45193681e3027ad08786
parentd21a8e3bc6325a94da178050181a4bcb7e017dfa
re PR tree-optimization/79725 (Sinking opportunity missed if blocked by dead stmt)

2017-04-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79725
* tree-ssa-sink.c (statement_sink_location): Return whether
failure reason was zero uses.  Move that check later.
(sink_code_in_bb): Deal with zero uses by removing the stmt
if possible.

* gcc.dg/tree-ssa/ssa-sink-15.c: New testcase.

From-SVN: r247091
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-15.c [new file with mode: 0644]
gcc/tree-ssa-sink.c