mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[MiSched] Fix a logic error in tryPressure()
Fixes a logic error in the MachineScheduler found by Steve Montgomery (and confirmed by Andy). This has gone unfixed for months because the fix has been found to introduce some small performance regressions. However, Andy has recommended that, at this point, we fix this to avoid further dependence on the incorrect behavior (and then follow-up separately on any regressions), and I agree. Fixes PR18883. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219512 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2495,8 +2495,8 @@ static bool tryPressure(const PressureChange &TryP,
|
||||
}
|
||||
// If one candidate decreases and the other increases, go with it.
|
||||
// Invalid candidates have UnitInc==0.
|
||||
if (tryLess(TryP.getUnitInc() < 0, CandP.getUnitInc() < 0, TryCand, Cand,
|
||||
Reason)) {
|
||||
if (tryGreater(TryP.getUnitInc() < 0, CandP.getUnitInc() < 0, TryCand, Cand,
|
||||
Reason)) {
|
||||
return true;
|
||||
}
|
||||
// If the candidates are decreasing pressure, reverse priority.
|
||||
|
Reference in New Issue
Block a user