[llvm] [AMDGPU] Remove setcc by using add/sub carryout (PR #155255)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 04:13:23 PDT 2025


================
@@ -6132,11 +6129,11 @@ SITargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
           .addImm(0);
     }
 
-    // clang-format off
-    BuildMI(*BB, MII, DL, TII->get(Opc), Dest.getReg())
-        .add(Src0)
-        .add(Src1);
-    // clang-format on
+    unsigned Opc = (MI.getOpcode() == AMDGPU::S_ADD_CO_PSEUDO)
----------------
arsenm wrote:

```suggestion
    unsigned Opc = MI.getOpcode() == AMDGPU::S_ADD_CO_PSEUDO
```

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


More information about the llvm-commits mailing list