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://review.tizen.org/git/?a=commitdiff_plain;h=d729115fa76e7c6c45da10ff4aad39088c1a5399;p=platform%2Fupstream%2Fllvm.git more efficient use of a dyn_cast; no functional change intended llvm-svn: 225523 --- diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index 342d1d1..f7f5e32 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/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; } }