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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 21:58:09 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 &&
----------------
arsenm wrote:

This is a hack to avoid riscv64 regressions, since the call lowering inserts an and after the CopyFromReg 

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


More information about the llvm-commits mailing list