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

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 09:01:23 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())) &&
----------------
AlexMaclean wrote:

Sounds good, I've created https://github.com/llvm/llvm-project/pull/116082 to land this separately

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


More information about the llvm-commits mailing list