[SimplifyCFG] Followup fix to r280790
commite50466a8d1bca43d0e453b07f3011399eac18494
authorJames Molloy <james.molloy@arm.com>
Wed, 7 Sep 2016 09:01:22 +0000 (7 09:01 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 7 Sep 2016 09:01:22 +0000 (7 09:01 +0000)
tree76d583d6ed8fc54505414d1429c69fb9ff04f8ab
parent80fedcb5bfee424c9277614b6045ce9972daabec
[SimplifyCFG] Followup fix to r280790

In failure cases it's not guaranteed that the PHI we're inspecting is actually in the successor block! In this case we need to bail out early, and never query getIncomingValueForBlock() as that will cause an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280794 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp