[all-commits] [llvm/llvm-project] 2e1c1d: MSVC AArch64 ABI: Homogeneous aggregates
David Blaikie via All-commits
all-commits at lists.llvm.org
Tue Oct 4 13:17:49 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e1c1d6d72879cafc339ad035b1b5a6d1c8cc130
https://github.com/llvm/llvm-project/commit/2e1c1d6d72879cafc339ad035b1b5a6d1c8cc130
Author: David Blaikie <dblaikie at gmail.com>
Date: 2022-10-04 (Tue, 04 Oct 2022)
Changed paths:
M clang/lib/CodeGen/MicrosoftCXXABI.cpp
M clang/test/CodeGenCXX/homogeneous-aggregates.cpp
Log Message:
-----------
MSVC AArch64 ABI: Homogeneous aggregates
Fixes:
Protected members, HFA: https://godbolt.org/z/zqdK7vdKc
Private members, HFA: https://godbolt.org/z/zqdK7vdKc
Non-empty base, HFA: https://godbolt.org/z/PKTz59Wev
User-provided ctor, HFA: https://godbolt.org/z/sfrTddcW6
Existing correct cases:
Empty base class, NonHFA: https://godbolt.org/z/4veY9MWP3
- correct by accident of not allowing bases at all (see non-empty base
case/fix above for counterexample)
Polymorphic: NonHFA: https://godbolt.org/z/4veY9MWP3
Trivial copy assignment, HFA: https://godbolt.org/z/Tdecj836P
Non-trivial copy assignment, NonHFA: https://godbolt.org/z/7c4bE9Whq
Non-trivial default ctor, NonHFA: https://godbolt.org/z/Tsq1EE7b7
- correct by accident of disallowing all user-provided ctors (see
user-provided non-default ctor example above for counterexample)
Trivial dtor, HFA: https://godbolt.org/z/nae999aqz
Non-trivial dtor, NonHFA: https://godbolt.org/z/69oMcshb1
Empty field, NonHFA: https://godbolt.org/z/8PTxsKKMK
- true due to checking for the absence of padding (see comment in code)
After a bunch of testing, this fixes a bunch of cases that were
incorrect. Some of the tests verify the nuances of the existing
behavior/code checks that were already present.
This was mostly motivated by cleanup from/in D133817 which itself was
motivated by D119051.
By removing the incorrect use of isTrivialForAArch64MSVC here & adding
more nuance to the homogeneous testing we can more safely/confidently
make changes to the isTrivialFor(AArch64)MSVC to more properly align
with its usage anyway.
Differential Revision: https://reviews.llvm.org/D134688
More information about the All-commits
mailing list