[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 ddc4b56eef
commit 9dbe736cbd
1 changed files with 1 additions and 1 deletions

View File

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