mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[AArch64] Fix regression after r329691
In r329691, we would choose FP even if the offset wouldn't fit, just because the offset is smaller than the one from BP. This made many accesses through FP need to scavenge a register, which resulted in slower and bigger code for no good reason. This patch now always picks the offset that fits first, even if FP is preferred. llvm-svn: 329797
This commit is contained in:
parent
74100cfc77
commit
5194d11e51
@ -1052,7 +1052,7 @@ int AArch64FrameLowering::resolveFrameIndexReference(const MachineFunction &MF,
|
||||
// else we can use BP and FP, but the offset from FP won't fit.
|
||||
// That will make us scavenge registers which we can probably avoid by
|
||||
// using BP. If it won't fit for BP either, we'll scavenge anyway.
|
||||
} else if (PreferFP || FPOffset >= 0) {
|
||||
} else if (FPOffset >= 0) {
|
||||
// Use SP or FP, whichever gives us the best chance of the offset
|
||||
// being in range for direct access. If the FPOffset is positive,
|
||||
// that'll always be best, as the SP will be even further away.
|
||||
|
Loading…
Reference in New Issue
Block a user