[llvm] [AMDGPU][MC] Disallow null as saddr in flat instructions (PR #101730)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 11:57:37 PDT 2024
================
@@ -6244,7 +6248,11 @@ void SIInstrInfo::legalizeOperandsFLAT(MachineRegisterInfo &MRI,
if (moveFlatAddrToVGPR(MI))
return;
- Register ToSGPR = readlaneVGPRToSGPR(SAddr->getReg(), MI, MRI);
+ const TargetRegisterClass *DeclaredRC =
+ getRegClass(MI.getDesc(), SAddr->getOperandNo(),
+ MRI.getTargetRegisterInfo(), *MI.getParent()->getParent());
----------------
arsenm wrote:
```suggestion
&RI, *MI.getParent()->getParent());
```
https://github.com/llvm/llvm-project/pull/101730
More information about the llvm-commits
mailing list