[PATCH] D92751: [clang][aarch64] Precondition isHomogeneousAggregate on isCXX14Aggregate

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 7 10:01:00 PST 2021


rnk added inline comments.


================
Comment at: clang/lib/CodeGen/CGCXXABI.h:143
   /// Returns how an argument of the given record type should be passed.
   virtual RecordArgABI getRecordArgABI(const CXXRecordDecl *RD) const = 0;
 
----------------
nit: I would group the new virtual method declaration after these two, since it also has to do with argument classification.


================
Comment at: clang/lib/CodeGen/MicrosoftCXXABI.cpp:4370
+  // AAPCS64, but is defacto spec on that platform.
+  return isTrivialForAArch64MSVC(CXXRD);
+}
----------------
I think x64 vectorcall supports HVAs, so this could change behavior there, unless you check the triple for aarch64.

Following the principle of limiting the scope of the change, this seems like the right condition:
  return !CGM.getTarget().getTriple().isAArch64() || isTrivialForAArch64MSVC(CXXRD);

We can follow up with more x64 vectorcall tests later.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92751/new/

https://reviews.llvm.org/D92751



More information about the cfe-commits mailing list