[llvm] [NVPTX] Fix lowering of i1 SETCC (PR #115035)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 13:54:45 PST 2024


================
@@ -4966,7 +4966,7 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
         APInt C = C1 + 1;
         ISD::CondCode NewCC = (Cond == ISD::SETLE) ? ISD::SETLT : ISD::SETULT;
         if ((DCI.isBeforeLegalizeOps() ||
-             isCondCodeLegal(NewCC, VT.getSimpleVT())) &&
+             isCondCodeLegal(NewCC, OpVT.getSimpleVT())) &&
----------------
Artem-B wrote:

This looks like an independent bug fix, which has a good chance of exposing issues or changing compiler output. 
You may consider submitting it as a separate patch.

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


More information about the llvm-commits mailing list