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

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 15:47:13 PST 2024


================
@@ -2666,6 +2667,46 @@ SDValue NVPTXTargetLowering::LowerShiftLeftParts(SDValue Op,
   }
 }
 
+// Lowers SETCC nodes that aren't directly supported by our arch.
----------------
AlexMaclean wrote:

Sorry, I'm still confused. I don't see anything like the boolean expansion I'm using for i1 in the LegalizeSetCCCondCode function. 

> And generic code can no longer accurately query which conditions are legal, which is why you have the hack to check if SETCC is legal

I think I'm going to need to add a check for legality to the dag combine no matter what, I suppose I can check this table instead. 

Also, is existing code like this incorrect? 

https://github.com/llvm/llvm-project/blob/c1cec8c0dc5b0296f0bc86745b867ff72c0a21e3/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp#L4994



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


More information about the llvm-commits mailing list