Before replacing a phi node with a different value, it
authorDuncan Sands <baldrick@free.fr>
Wed, 17 Nov 2010 20:49:12 +0000 (20:49 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 17 Nov 2010 20:49:12 +0000 (20:49 +0000)
commit6f8a5ddcd8d7e5b041ff083009ae84de0e6e588b
tree5bc9a4b56f9ba384112ab0b5cae746282ba66aa7
parent5aba9f694fbfb78df2aa2a228e85ba4c27f3037b
Before replacing a phi node with a different value, it
needs to be checked that this won't break LCSSA form.
Change the existing checking method to a more direct one:
rather than seeing if all predecessors belong to the loop,
check that the replacing value is either not in any loop or
is in a loop that contains the phi node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119556 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp