1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

indvars: drive by heuristics fix.

Minor oversight noticed by inspection. Sorry no unit test.

llvm-svn: 160422
This commit is contained in:
Andrew Trick 2012-07-18 04:35:13 +00:00
parent 612785f908
commit d184d6a362

View File

@ -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;