summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/IndVarSimplify.cpp
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
commit7f496a628eb93d60eed39340fcc5e89479eda488 (patch)
treef77eacf9efd6845555d93ac4562ceff1154db25e /lib/Transforms/Scalar/IndVarSimplify.cpp
parent4781d8ee1cd586bf7a569f80e1e49694c93eddd8 (diff)
downloadllvm-7f496a628eb93d60eed39340fcc5e89479eda488.tar.gz
llvm-7f496a628eb93d60eed39340fcc5e89479eda488.tar.bz2
llvm-7f496a628eb93d60eed39340fcc5e89479eda488.tar.xz
indvars: drive by heuristics fix.
Minor oversight noticed by inspection. Sorry no unit test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 4b5c84ca6c..37f8bdfbff 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/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;