[clang] [compiler-rt] [llvm] [WIP][SPARC] Properly handle CC for long double on sparc32 (PR #162226)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 7 16:49:30 PDT 2025


================
@@ -554,20 +554,19 @@ SDValue SparcTargetLowering::LowerFormalArguments_32(
       continue;
     }
 
-    int FI = MF.getFrameInfo().CreateFixedObject(4,
-                                                 Offset,
-                                                 true);
-    SDValue FIPtr = DAG.getFrameIndex(FI, PtrVT);
-    SDValue Load ;
+    int FI;
     if (VA.getValVT() == MVT::i32 || VA.getValVT() == MVT::f32) {
-      Load = DAG.getLoad(VA.getValVT(), dl, Chain, FIPtr, MachinePointerInfo());
+      FI = MF.getFrameInfo().CreateFixedObject(4, Offset, true);
     } else if (VA.getValVT() == MVT::f128) {
-      report_fatal_error("SPARCv8 does not handle f128 in calls; "
-                         "pass indirectly");
+      FI = MF.getFrameInfo().CreateFixedObject(16, Offset, false);
----------------
efriedma-quic wrote:

This doesn't look right.

If the value is passed indirectly, that's encoded in VA: call getLocInfo(), check for CCValAssign::Indirect.  If it's indirect, the argument is a pointer, so you need to load the pointer, then load the underlying value from that pointer.

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


More information about the llvm-commits mailing list