[clang] [llvm] [clang][X86] Return Win64 __int128 indirectly (PR #210358)

via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 20 14:50:44 PDT 2026


================
@@ -3556,12 +3556,10 @@ ABIArgInfo WinX86_64ABIInfo::classify(QualType Ty, unsigned &FreeSSERegs,
             Align, /*AddrSpace=*/getDataLayout().getAllocaAddrSpace(),
             /*ByVal=*/false);
 
-      // Mingw64 GCC returns i128 in XMM0. Coerce to v2i64 to handle that.
-      // Clang matches them for compatibility.
       if (BT->getKind() == BuiltinType::Int128 ||
           BT->getKind() == BuiltinType::UInt128)
-        return ABIArgInfo::getDirect(llvm::FixedVectorType::get(
-            llvm::Type::getInt64Ty(getVMContext()), 2));
+        return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
+                                       /*ByVal=*/false);
----------------
oltolm wrote:

Done. I had to explicitly set `sret-after-this` for MSVC ABI.

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


More information about the cfe-commits mailing list