[llvm] DAG: Assert fcmp uno runtime calls are boolean values (PR #142898)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 5 13:23:55 PDT 2025


================
@@ -429,8 +429,20 @@ void TargetLowering::softenSetCCOperands(SelectionDAG &DAG, EVT VT,
     // Update Chain.
     Chain = Call.second;
   } else {
+    assert(CCCode == (ShouldInvertCC ? ISD::SETEQ : ISD::SETNE) &&
+           "unordered call should be simple boolean");
+
     EVT SetCCVT =
         getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), RetVT);
+    if (RetVT == SetCCVT &&
----------------
efriedma-quic wrote:

On RISCV64, the boolean should, in fact, be extended to 64 bits, and there should be an AssertSext recording that.  And call lowering shouldn't insert a mask.  Maybe PromoteIntRes_AssertZext is the culprit here?

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


More information about the llvm-commits mailing list