[llvm] [AMDGPU][MC] Disallow null as saddr in flat instructions (PR #101730)
Jun Wang via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 14:11:48 PDT 2024
================
@@ -6215,6 +6215,8 @@ void SIInstrInfo::legalizeOperandsFLAT(MachineRegisterInfo &MRI,
return;
Register ToSGPR = readlaneVGPRToSGPR(SAddr->getReg(), MI, MRI);
+ if (MRI.getRegClass(ToSGPR) == &AMDGPU::SReg_64RegClass)
+ MRI.setRegClass(ToSGPR, &AMDGPU::SReg_64_XEXEC_XNULLRegClass);
----------------
jwanggit86 wrote:
Done. Changed to declared reg class.
https://github.com/llvm/llvm-project/pull/101730
More information about the llvm-commits
mailing list