diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 86657c2c0e5..bbf5241b34f 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -1799,10 +1799,8 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal, } else { ConstantInt *Cond = dyn_cast(getVal(Values, BI->getCondition())); + if (!Cond) return false; // Cannot determine. - // Cannot determine. - if (!Cond || Cond->getType() != Type::Int1Ty) - return false; NewBB = BI->getSuccessor(!Cond->getZExtValue()); } } else if (SwitchInst *SI = dyn_cast(CurInst)) {