mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 05:46:06 +00:00
indvars: drive by heuristics fix.
Minor oversight noticed by inspection. Sorry no unit test. llvm-svn: 160422
This commit is contained in:
parent
c08726627c
commit
0d07dfcd6f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user