diff options
| author | Andrew Trick <atrick@apple.com> | 2012-07-18 04:35:13 +0000 |
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2012-07-18 04:35:13 +0000 |
| commit | 0d07dfcd6f88a225e055188822dd5abee1ca20f7 (patch) | |
| tree | 5098c8efbf0f22eef275464d5c66ced254682de3 | |
| parent | c08726627cd222ba1ac186935a2e0f4213e0d3bf (diff) | |
| download | bcm5719-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
| -rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 2 |
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; |

