summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LazyValueInfo.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2015-01-09 16:28:15 +0000
committerSanjay Patel <spatel@rotateright.com>2015-01-09 16:28:15 +0000
commitd729115fa76e7c6c45da10ff4aad39088c1a5399 (patch)
tree3d4d940010d6302db10eed9dcd2edda582738be9 /llvm/lib/Analysis/LazyValueInfo.cpp
parentb359b735d6c0b90f6cfe583002ac56e1cc633f30 (diff)
downloadbcm5719-llvm-d729115fa76e7c6c45da10ff4aad39088c1a5399.tar.gz
bcm5719-llvm-d729115fa76e7c6c45da10ff4aad39088c1a5399.zip
more efficient use of a dyn_cast; no functional change intended
llvm-svn: 225523
Diffstat (limited to 'llvm/lib/Analysis/LazyValueInfo.cpp')
-rw-r--r--llvm/lib/Analysis/LazyValueInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 342d1d13834..f7f5e32d442 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<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;
}
}
OpenPOWER on IntegriCloud