From: Sanjay Patel Date: Fri, 9 Jan 2015 16:28:15 +0000 (+0000) Subject: more efficient use of a dyn_cast; no functional change intended X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b1d136dd4f1da62b12f88c6c6082c44125f4a49a;p=oota-llvm.git 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 --- 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; } }