[llvm] [X86][windows] Return `fp128` on the stack (PR #194214)

Trevor Gross via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 26 00:23:27 PDT 2026


tgross35 wrote:

> Since ABI doesn’t specify this, why choose the less efficient approach? Why can’t make gcc match clang’s behavior?

That was my initial plan for a long time, which I noted in the linked commit. But I talked with a handful of people and got the impression that the proposed behavior here (return on the stack) is likely a closer interpretation of the MSVC ABI's handling of fundamental types than returning in xmm0. This also applies to i128 but it is much more set in stone (based on some light GCC archaeology I got the feeling that returning __int128 in xmm0 is not really intentional, but rather a carryover of __m128).

If that's the case then I don't think the performance difference is especially concerning. The type already needs to be passed in memory and even a simple f128 addition is ~300 instructions, an extra `movups` won't matter much.

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


More information about the llvm-commits mailing list