diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-16 16:32:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-16 16:32:28 +0000 |
commit | 73559b1f4c18970f97f62d28bacfaebd4020e974 (patch) | |
tree | c57c5252ff43456fd3282c789818460bb66df01a | |
parent | e5525438b00eec1275ff454f3a31a4f848744f7a (diff) |
Do not delete dead invoke instructions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17897 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 603a52b235..fcb508f951 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -875,7 +875,7 @@ bool SCCP::runOnFunction(Function &F) { Instruction *Inst = BI++; if (Inst->getType() != Type::VoidTy) { LatticeVal &IV = Values[Inst]; - if (IV.isConstant() || IV.isUndefined()) { + if (IV.isConstant() || IV.isUndefined() && !isa<TerminatorInst>(Inst)) { Constant *Const; if (IV.isConstant()) { Const = IV.getConstant(); @@ -900,4 +900,3 @@ bool SCCP::runOnFunction(Function &F) { return MadeChanges; } - |