[PATCH] D153179: [clang codegen] Fix ABI for HVA returns on AArch64 MSVC.
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 20 13:43:53 PDT 2023
rnk added a comment.
Interesting. In Clang, we basically layer the C++ rules over the C rules: if C++ aspects of a class allow it to be passed directly transparently, then we defer down to the C rules, which deal with HVAs, structs, and things like that.
In D153179#4429813 <https://reviews.llvm.org/D153179#4429813>, @efriedma wrote:
> Restrict to AArch64.
>
> Actually, it seems like something sort of similar happens with x86 vectorcall. But I haven't tried to test all the permutations of that, so don't modify the behavior for now.
Can you file an issue for that and cc me?
================
Comment at: clang/test/CodeGenCXX/homogeneous-aggregates.cpp:294
+typedef double V __attribute((ext_vector_type(2)));
+struct base { V v; };
+struct test { test(double); protected: V v2;};
----------------
Can you do the same test again with a non-vector field (double) for test coverage?
================
Comment at: clang/test/CodeGenCXX/homogeneous-aggregates.cpp:295
+struct base { V v; };
+struct test { test(double); protected: V v2;};
+test f(test *x) { return *x; }
----------------
Did you mean to inherit from `base` here to make a two-element HVA?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153179/new/
https://reviews.llvm.org/D153179
More information about the cfe-commits
mailing list