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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 20:11:23 PST 2024


================
@@ -11874,6 +11874,47 @@ bool TargetLowering::LegalizeSetCCCondCode(SelectionDAG &DAG, EVT VT,
       return true;
     }
 
+    // Special case: expand i1 comparisons using logical operations.
+    if (OpVT == MVT::i1) {
----------------
arsenm wrote:

Do you have a more specific example for "not correct for larger types"? It's not an arbitrary wide typed value. The result conforms to getTargetBooleanContents, which in turn should respect all of the logical expansions 

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


More information about the llvm-commits mailing list