[llvm] [AMDGPU] Detect illegal 64 relocs in SIFold (PR #219141)
David Stuttard via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 05:44:40 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
----------------
dstutt wrote:
> Also why do you need the checks for V_MOV_B64_PSEUDO and S_MOV_B64_IMM_PSEUDO here? (And if they are needed here, why aren't they needed in the 64-bit immediate case just above?)
Presume you mean below? Actually, maybe it should have this too? I guess it matters less there because ultimately it gets split for the mov anyway.
But - it might be that it should, and I think there's a way to refactor the later change to fold it into the isImm version - let me re-work and I'll post another patch.
https://github.com/llvm/llvm-project/pull/219141
More information about the llvm-commits
mailing list