[llvm-branch-commits] [llvm] AMDGPU: Fix DPP combiner using isOperandLegal on incomplete inst (PR #155595)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 27 21:31:21 PDT 2025


================
@@ -250,7 +250,7 @@ MachineInstr *GCNDPPCombine::createDPPInst(MachineInstr &OrigMI,
       ++NumOperands;
     }
     if (auto *SDst = TII->getNamedOperand(OrigMI, AMDGPU::OpName::sdst)) {
-      if (TII->isOperandLegal(*DPPInst.getInstr(), NumOperands, SDst)) {
+      if (AMDGPU::hasNamedOperand(DPPOp, AMDGPU::OpName::sdst)) {
----------------
arsenm wrote:

Yes. isOperandLegal doesn't do anything meaningful on results 

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


More information about the llvm-branch-commits mailing list