[llvm] [AMDGPU] Detect illegal 64 relocs in SIFold (PR #219141)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 06:33:25 PDT 2026


================
@@ -5431,6 +5442,18 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
         ErrInfo = "illegal 64-bit immediate value for operand.";
         return false;
       }
+      // A global with a 64-bit relocation resolves to a 64-bit literal at link
+      // time. It cannot be encoded without 64-bit literal support, nor in
+      // 8-byte encodings (e.g. VOP3, VOP3P, VOPD) which cannot carry one.
+      // V_MOV_B64_PSEUDO and S_MOV_B64_IMM_PSEUDO are exempt: they split the
+      // relocation into lo/hi halves when expanded in expandPostRAPseudo.
----------------
arsenm wrote:

Should this be a new operand type? Handling this here will also mean this case will not be caught by the assembler 

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


More information about the llvm-commits mailing list