From d184d6a36203defca698722d47911a0c33350ba2 Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Wed, 18 Jul 2012 04:35:13 +0000 Subject: [PATCH] indvars: drive by heuristics fix. Minor oversight noticed by inspection. Sorry no unit test. llvm-svn: 160422 --- lib/Transforms/Scalar/IndVarSimplify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 4b5c84ca6ce..37f8bdfbffe 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;