projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b359b73
)
more efficient use of a dyn_cast; no functional change intended
author
Sanjay Patel
<spatel@rotateright.com>
Fri, 9 Jan 2015 16:28:15 +0000
(16:28 +0000)
committer
Sanjay Patel
<spatel@rotateright.com>
Fri, 9 Jan 2015 16:28:15 +0000
(16:28 +0000)
llvm-svn: 225523
llvm/lib/Analysis/LazyValueInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/LazyValueInfo.cpp
b/llvm/lib/Analysis/LazyValueInfo.cpp
index
342d1d1
..
f7f5e32
100644
(file)
--- 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<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;
}
}