[llvm] [SDAG] Add missing float type legalizations for FMODF (PR #128055)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 02:28:14 PST 2025


================
@@ -825,8 +834,14 @@ DAGTypeLegalizer::SoftenFloatRes_UnaryWithTwoFPResults(SDNode *N,
         MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FrameIdx);
     return DAG.getLoad(NVT, DL, Chain, StackSlot, PtrInfo);
   };
-  SetSoftenedFloat(SDValue(N, 0), CreateStackLoad(FirstResultSlot));
-  SetSoftenedFloat(SDValue(N, 1), CreateStackLoad(SecondResultSlot));
+
+  for (auto [ResNum, SlackSlot] : enumerate(StackSlots)) {
+    if (CallRetResNo == ResNum) {
----------------
sdesmalen-arm wrote:

Does this not fail if `CallRetResNo == std::nullopt` ?

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


More information about the llvm-commits mailing list