Fix PR25372 - teach replaceCongruentPHIs to handle cases where SE evaluates a PHI...
authorSilviu Baranga <silviu.baranga@arm.com>
Tue, 3 Nov 2015 16:27:04 +0000 (16:27 +0000)
committerSilviu Baranga <silviu.baranga@arm.com>
Tue, 3 Nov 2015 16:27:04 +0000 (16:27 +0000)
Summary:
Since now Scalar Evolution can create non-add rec expressions for PHI
nodes, it can also create SCEVConstant expressions. This will confuse
replaceCongruentPHIs, which previously relied on the fact that SCEV
could not produce constants in this case.

We will now replace the node with a constant in these cases - or avoid
processing the Phi in case of a type mismatch.

Reviewers: sanjoy

Subscribers: llvm-commits, majnemer

Differential Revision: http://reviews.llvm.org/D14230

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251938 91177308-0d34-0410-b5e6-96231b3b80d8


No differences found