]> granicus.if.org Git - llvm/commit
[SimplifyCFG] avoid crashing after simplifying a switch (PR42737)
authorSanjay Patel <spatel@rotateright.com>
Thu, 25 Jul 2019 17:01:12 +0000 (17:01 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 25 Jul 2019 17:01:12 +0000 (17:01 +0000)
commit68a1a6cfae884e1166dd9a5b652d59128c645184
tree2579c16408d866567a688821e6a824c7977e4ce6
parentef111f1ec8e79d219ffafdf1dabd7477d4df44f9
[SimplifyCFG] avoid crashing after simplifying a switch (PR42737)

Later code in TryToSimplifyUncondBranchFromEmptyBlock() assumes that
we have cleaned up unreachable blocks, but that was not happening
with this switch transform.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367037 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/switch-range-to-icmp.ll