[llvm] r225523 - more efficient use of a dyn_cast; no functional change intended
Sanjay Patel
spatel at rotateright.com
Fri Jan 9 08:28:15 PST 2015
Author: spatel
Date: Fri Jan 9 10:28:15 2015
New Revision: 225523
URL: http://llvm.org/viewvc/llvm-project?rev=225523&view=rev
Log:
more efficient use of a dyn_cast; no functional change intended
Modified:
llvm/trunk/lib/Analysis/LazyValueInfo.cpp
Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=225523&r1=225522&r2=225523&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Fri Jan 9 10:28:15 2015
@@ -905,9 +905,9 @@ static bool getEdgeValueLocal(Value *Val
// 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;
}
}
More information about the llvm-commits
mailing list