diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 603a52b2358..fcb508f9515 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(Inst)) { Constant *Const; if (IV.isConstant()) { Const = IV.getConstant(); @@ -900,4 +900,3 @@ bool SCCP::runOnFunction(Function &F) { return MadeChanges; } -