[llvm] [CodeGen] MachineVerifier to check early-clobber constraint (PR #151421)
Abhay Kanhere via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 5 16:51:44 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:
The problem here is that MI.setDesc which only updates opcode, and MI.addOperand following MI.buildInstr/ that create new instruction behave differently in how Operand constraints are updated.
https://github.com/llvm/llvm-project/pull/151421
More information about the llvm-commits
mailing list