[llvm] [AMDGPU][NFC] Refactor FLAT_Global_* pseudos. (PR #120244)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 07:46:46 PST 2024


================
@@ -205,13 +205,13 @@ class GlobalSaddrTable <bit is_saddr, string Name = ""> {
 class FLAT_Load_Pseudo <string opName, RegisterClass regClass,
   bit HasTiedOutput = 0,
   bit HasSaddr = 0, bit EnableSaddr = 0,
+  RegisterClass VaddrRC = !if(EnableSaddr, VGPR_32, VReg_64),
   RegisterOperand vdata_op = getLdStRegisterOperand<regClass>.ret> : FLAT_Pseudo<
   opName,
   (outs vdata_op:$vdst),
   !con(
     !if(EnableSaddr,
-      (ins SReg_64_XEXEC_XNULL:$saddr, VGPR_32:$vaddr),
-      (ins VReg_64:$vaddr)),
+      (ins SReg_64_XEXEC_XNULL:$saddr), (ins)), (ins VaddrRC:$vaddr),
       (ins flat_offset:$offset),
----------------
jayfoad wrote:

Pre-existing problem but the indentation is wrong here. This line is not inside the `!if` so it should be aligned with the `!if`.

https://github.com/llvm/llvm-project/pull/120244


More information about the llvm-commits mailing list