[clang] [clang][CodeGen] Fix MSVC ABI for HVA/HFA returns with vectorcall on x86 (PR #113104)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 18 11:41:37 PDT 2026


================
@@ -1110,6 +1110,10 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty,
       isa<VectorType>(Base)) {
     return true;
   }
+  if (CGM.getTarget().getTriple().isX86() &&
+      CGM.getABIInfo().isHomogeneousAggregate(Ty, Base, NumElts)) {
----------------
efriedma-quic wrote:

canPassInRegisters() is already a little weird on Microsoft targets; we set it to true for classes the standard forbids returning in registers.  Going a little further outside those rules is probably okay.

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


More information about the cfe-commits mailing list