[clang] [llvm] [X86][Windows] Return `fp128` on the stack (PR #204887)

Folkert de Vries via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 27 10:06:40 PDT 2026


================
@@ -3,10 +3,21 @@
 // __float128 is unsupported on MSVC
 
 __float128 fp128_ret(void) { return 0; }
-// CHECK-GNU64: define dso_local <2 x i64>  @fp128_ret()
+// CHECK-GNU64: define dso_local void @fp128_ret(ptr dead_on_unwind noalias writable sret(fp128) align 16 %agg.result)
 
 __float128 fp128_args(__float128 a, __float128 b) { return a * b; }
-// CHECK-GNU64: define dso_local <2 x i64> @fp128_args(ptr noundef dead_on_return %0, ptr noundef dead_on_return %1)
+// CHECK-GNU64: define dso_local void @fp128_args(ptr dead_on_unwind noalias writable sret(fp128) align 16 %agg.result, ptr noundef dead_on_return %0, ptr noundef dead_on_return %1)
+
+__float128 __attribute__((vectorcall)) fp128_ret_vectorcall(void) { return 0; }
+// CHECK-GNU64: define dso_local x86_vectorcallcc fp128 @"\01fp128_ret_vectorcall@@0"()
----------------
folkertdev wrote:

this returns `fp128` and then it's up to the backend to figure out what that means. We could force `XMM0` with the `<2 x i64>` trick, I haven't done that yet because it does seem a bit hacky.

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


More information about the cfe-commits mailing list