[SimplifyCFG] fix accessing deleted PHINodes in switch-to-table conversion.
authorManman Ren <manman.ren@gmail.com>
Sat, 2 Aug 2014 23:41:54 +0000 (23:41 +0000)
committerManman Ren <manman.ren@gmail.com>
Sat, 2 Aug 2014 23:41:54 +0000 (23:41 +0000)
commit3d5463d81f1278bc75b273d17ec84ec8438be1a1
treedc704dc3aea12f88e78833156d0fcb16c080602f
parenta0e1d10f75d64c0ef0b9b19f4d1067f7671ebd91
[SimplifyCFG] fix accessing deleted PHINodes in switch-to-table conversion.

When we have a covered lookup table, make sure we don't delete PHINodes that
are cached in PHIs.

rdar://17887153

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214642 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll [new file with mode: 0644]