[llvm] [CodeGen] MachineVerifier to check early-clobber constraint (PR #151421)

Abhay Kanhere via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 27 13:08:28 PDT 2025


================
@@ -584,6 +584,7 @@ bool AMDGPUInstructionSelector::selectG_AMDGPU_MAD_64_32(
   I.setDesc(TII.get(Opc));
   I.addOperand(*MF, MachineOperand::CreateImm(0));
   I.addImplicitDefUseOperands(*MF);
+  I.getOperand(0).setIsEarlyClobber(true);
----------------
AbhayKanhere wrote:

Inline asm will not work either - early clobber is set in IR. inline asm are passed on to assembler intact.

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


More information about the llvm-commits mailing list