1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[AMDGPU] Be more specific in needsFrameBaseReg

A condition "mayLoadOrStore" is too broad for that function.

Differential Revision: https://reviews.llvm.org/D95700
This commit is contained in:
Stanislav Mekhanoshin 2021-01-29 14:38:29 -08:00
parent f23effe39b
commit cea4122bba

View File

@ -408,7 +408,7 @@ int64_t SIRegisterInfo::getFrameIndexInstrOffset(const MachineInstr *MI,
} }
bool SIRegisterInfo::needsFrameBaseReg(MachineInstr *MI, int64_t Offset) const { bool SIRegisterInfo::needsFrameBaseReg(MachineInstr *MI, int64_t Offset) const {
if (!MI->mayLoadOrStore()) if (!SIInstrInfo::isMUBUF(*MI) && !SIInstrInfo::isFLATScratch(*MI))
return false; return false;
int64_t FullOffset = Offset + getScratchInstrOffset(MI); int64_t FullOffset = Offset + getScratchInstrOffset(MI);