more efficient use of a dyn_cast; no functional change intended

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjay Patel 2015-01-09 16:28:15 +00:00
parent 139bfee84c
commit b1d136dd4f

View File

@ -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<ICmpInst>(BI->getCondition());
if (getValueFromFromCondition(Val, ICI, Result, isTrueDest))
return true;
if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition()))
if (getValueFromFromCondition(Val, ICI, Result, isTrueDest))
return true;
}
}