diff --git a/lib/Analysis/LazyValueInfo.cpp b/lib/Analysis/LazyValueInfo.cpp index 342d1d13834..f7f5e32d442 100644 --- a/lib/Analysis/LazyValueInfo.cpp +++ b/lib/Analysis/LazyValueInfo.cpp @@ -905,9 +905,9 @@ static bool getEdgeValueLocal(Value *Val, BasicBlock *BBFrom, // If the condition of the branch is an equality comparison, we may be // able to infer the value. - ICmpInst *ICI = dyn_cast(BI->getCondition()); - if (getValueFromFromCondition(Val, ICI, Result, isTrueDest)) - return true; + if (ICmpInst *ICI = dyn_cast(BI->getCondition())) + if (getValueFromFromCondition(Val, ICI, Result, isTrueDest)) + return true; } }