mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
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
This commit is contained in:
parent
4781d8ee1c
commit
7f496a628e
@ -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…
Reference in New Issue
Block a user