[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-05-02 Thread Oliver Stannard via cfe-commits
ostannard wrote: I'd assumed that this was a sufficiently uncommon edge-case that it wasn't worth a release note, but I'll keep that in mind in future and add release notes for things like this. https://github.com/llvm/llvm-project/pull/126774 ___ cf

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-05-01 Thread Florian Mayer via cfe-commits
fmayer wrote: Could we make sure this gets called out in the Release Notes? Even if it's a fix, this is a change of ABI which could break stuff. https://github.com/llvm/llvm-project/pull/126774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-04-30 Thread Oliver Stannard via cfe-commits
ostannard wrote: That looks like the expected consequence of this change: * Previously, the anonymous bitfield was erroneously given a 64-bit container, so it occupied 7 copies of the container type, starting at byte 8 of the struct and ending at 64. * Now, it is given a 128-bit container, as r

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-04-29 Thread Florian Mayer via cfe-commits
fmayer wrote: This changed the size of the following struct: ``` #include struct A { bool value : 64 = false; uint64_t : 448; }; static_assert(sizeof(A) == 64); ``` Used to be 64 but became 80. I bisected to this change. ``` $ llvm-project/build/bin/clang++ -target aarch64 -c f

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-20 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/126774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-20 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/126774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-20 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/126774 >From 223eb6f3153bce087306f54c398034ff7a64c1d1 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Tue, 11 Feb 2025 17:40:55 + Subject: [PATCH 1/4] Add tests showing bugs --- clang/test/CodeGen/aapcs-al

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-20 Thread John Brawn via cfe-commits
@@ -161,5 +168,62 @@ int test_bitint8(){ } // CHECK: ret i32 1 +// Over-sized bitfield, which results in a 64-bit container type, so 64-bit +// alignment. +struct OverSizedBitfield { + int x : 64; +}; + +unsigned sizeof_OverSizedBitfield = sizeof(OverSizedBitfield); +unsigne

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-20 Thread Oliver Stannard via cfe-commits
ostannard wrote: Ping https://github.com/llvm/llvm-project/pull/126774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Stannard (ostannard) Changes This fixes two bugs in the ABI for over-sized bitfields for ARM and AArch64: The container type picked for an over-sized bitfield already contributes to the alignment of the structure, but it should als

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Oliver Stannard (ostannard) Changes This fixes two bugs in the ABI for over-sized bitfields for ARM and AArch64: The container type picked for an over-sized bitfield already contributes to the alignment of the structure, but it

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-11 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/126774 This fixes two bugs in the ABI for over-sized bitfields for ARM and AArch64: The container type picked for an over-sized bitfield already contributes to the alignment of the structure, but it should also cont