diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 30f4681c114..0e4fe8f52af 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1417,7 +1417,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 = IV.isConstant() ? IV.getConstant() : UndefValue::get(Inst->getType());