summaryrefslogtreecommitdiff
path: root/lib/Analysis/LazyValueInfo.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-08-27 17:12:29 +0000
committerOwen Anderson <resistor@mac.com>2010-08-27 17:12:29 +0000
commit660cab32fe5105bcaa17daa4704c24065ac0a7e6 (patch)
tree0fb70ca06ea4d8d01b26f861c227238e53ebbd64 /lib/Analysis/LazyValueInfo.cpp
parent67ef74e0e5863e32e4d581d5e197bf00cccddd01 (diff)
downloadllvm-660cab32fe5105bcaa17daa4704c24065ac0a7e6.tar.gz
llvm-660cab32fe5105bcaa17daa4704c24065ac0a7e6.tar.bz2
llvm-660cab32fe5105bcaa17daa4704c24065ac0a7e6.tar.xz
Use LVI to eliminate conditional branches where we've tested a related condition previously. Update tests for this change.
This fixes PR5652. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LazyValueInfo.cpp')
-rw-r--r--lib/Analysis/LazyValueInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/LazyValueInfo.cpp b/lib/Analysis/LazyValueInfo.cpp
index 31ca2de283..7e00f143c6 100644
--- a/lib/Analysis/LazyValueInfo.cpp
+++ b/lib/Analysis/LazyValueInfo.cpp
@@ -656,7 +656,8 @@ LVILatticeVal LVIQuery::getEdgeValue(BasicBlock *BBFrom, BasicBlock *BBTo) {
// Figure out the possible values of the query BEFORE this branch.
LVILatticeVal InBlock = getBlockValue(BBFrom);
- if (!InBlock.isConstantRange()) return InBlock;
+ if (!InBlock.isConstantRange())
+ return LVILatticeVal::getRange(TrueValues);
// Find all potential values that satisfy both the input and output
// conditions.