summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-07-07 18:49:41 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-07-07 18:49:41 +0000
commit6cc21f909ca067c52121316620e43dea115ea522 (patch)
tree0898ef600e8f5543ddfc7838bf8f3d75a4d86a66 /llvm/lib/Transforms
parentf6727b0da16a9fb5e9edc5d085881e8768b785af (diff)
downloadbcm5719-llvm-6cc21f909ca067c52121316620e43dea115ea522.tar.gz
bcm5719-llvm-6cc21f909ca067c52121316620e43dea115ea522.zip
Revert "Revert r241570, it caused PR24053"
This reverts commit r241602. We had a latent bug in SCCP where we would make a basic block empty and then proceed to ask questions about it's terminator. llvm-svn: 241616
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 305175ff8f7..4d3a708fa20 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -1799,11 +1799,10 @@ bool IPSCCP::runOnModule(Module &M) {
if (!TI->use_empty())
TI->replaceAllUsesWith(UndefValue::get(TI->getType()));
TI->eraseFromParent();
+ new UnreachableInst(M.getContext(), BB);
if (&*BB != &F->front())
BlocksToErase.push_back(BB);
- else
- new UnreachableInst(M.getContext(), BB);
continue;
}
OpenPOWER on IntegriCloud