summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-07-18 04:35:13 +0000
committerAndrew Trick <atrick@apple.com>2012-07-18 04:35:13 +0000
commit0d07dfcd6f88a225e055188822dd5abee1ca20f7 (patch)
tree5098c8efbf0f22eef275464d5c66ced254682de3 /llvm/lib/Transforms/Scalar
parentc08726627cd222ba1ac186935a2e0f4213e0d3bf (diff)
downloadbcm5719-llvm-0d07dfcd6f88a225e055188822dd5abee1ca20f7.tar.gz
bcm5719-llvm-0d07dfcd6f88a225e055188822dd5abee1ca20f7.zip
indvars: drive by heuristics fix.
Minor oversight noticed by inspection. Sorry no unit test. llvm-svn: 160422
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 4b5c84ca6ce..37f8bdfbffe 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -1409,7 +1409,7 @@ FindLoopCounter(Loop *L, const SCEV *BECount,
// If two IVs both count from zero or both count from nonzero then the
// narrower is likely a dead phi that has been widened. Use the wider phi
// to allow the other to be eliminated.
- if (PhiWidth <= SE->getTypeSizeInBits(BestPhi->getType()))
+ else if (PhiWidth <= SE->getTypeSizeInBits(BestPhi->getType()))
continue;
}
BestPhi = Phi;
OpenPOWER on IntegriCloud