]> granicus.if.org Git - llvm/commit
[SCEV] Don't create SCEV expressions that break LCSSA
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sat, 31 Oct 2015 23:21:40 +0000 (23:21 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sat, 31 Oct 2015 23:21:40 +0000 (23:21 +0000)
commit2b19a081101fb6af3ee2ae3726e4dec6b3a04cda
tree821417bd1a38f684fc301f8511d33426d4f5fe60
parent861933b54e6420b4179638aa59614a480ac32ed2
[SCEV] Don't create SCEV expressions that break LCSSA

Prevent `createNodeFromSelectLikePHI` from creating SCEV expressions
that break LCSSA.

A better fix for the same issue is to teach SCEVExpander to not break
LCSSA by inserting PHI nodes at appropriate places.  That's planned for
the future.

Fixes PR25360.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251756 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/smax-br-phi-idioms.ll
test/Transforms/IndVarSimplify/pr25360.ll [new file with mode: 0644]