[PR81611] accept copies in simple_iv_increment_p
commitdf5a65c85a22b7516b8183477f8fb3cfe3d450e5
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jan 2018 17:40:50 +0000 (30 17:40 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jan 2018 17:40:50 +0000 (30 17:40 +0000)
treefecd6616032e0c9bded68f1e029a06cf46d8ed5f
parent193a3497896746398039a02d2dbbf4d67205e488
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257194 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-ssa-dom.c