[PR81611] accept copies in simple_iv_increment_p
commitcacb4a794f079490a56eb99294947ba5acb4269a
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 30 Jan 2018 17:40:50 +0000 (30 17:40 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 30 Jan 2018 17:40:50 +0000 (30 17:40 +0000)
treefecd6616032e0c9bded68f1e029a06cf46d8ed5f
parenta5d37900ad8b09446297217a1748920bf58c99cc
[PR81611] accept copies in simple_iv_increment_p

If there are copies between the GIMPLE_PHI at the loop body and the
increment that reaches it (presumably through a back edge), still
regard it as a simple_iv_increment, so that we won't consider the
value in the back edge eligible for forwprop.  Doing so would risk
making the phi node and the incremented conflicting value live
within the loop, and the phi node to be preserved for propagated
uses after the loop.

for  gcc/ChangeLog

PR tree-optimization/81611
* tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
copies.

From-SVN: r257194
gcc/ChangeLog
gcc/tree-ssa-dom.c