[llvm] Use umin for x != 0 when +cssc is enabled (PR #169159)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 24 06:12:15 PST 2025


================
@@ -26417,6 +26418,12 @@ static SDValue performSETCCCombine(SDNode *N,
       return DAG.getNode(ISD::SETCC, DL, VT, TST, RHS, N->getOperand(2));
     }
   }
+  if (Subtarget->hasCSSC() && Cond == ISD::SETNE && isNullConstant(RHS) &&
----------------
MacDue wrote:

Could you add `DCI.isAfterLegalizeDAG()` here too? This currently also applies to illegal types, where it's not really desirable (e.g `i128`). 

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


More information about the llvm-commits mailing list