llvm-project
756884ca - [libc++][test] Drop _BitInt(96) byteswap padding check on 32-bit x86 (#205295)

Commit
16 days ago
[libc++][test] Drop _BitInt(96) byteswap padding check on 32-bit x86 (#205295) `byteswap.verify.cpp` (added in #203876) expects `std::byteswap(unsigned _BitInt(96))` to be rejected for having padding bits. That holds on x86_64, where the type is 16 bytes with 32 padding bits, but not on 32-bit x86: the i386 psABI aligns `_BitInt` to 4 bytes and packs `_BitInt(96)` into 12 bytes with no padding, so the call is well-formed and the expected diagnostic never fires. The Android i386 builder caught this. Gate `test_unsigned_96` on `!defined(__i386__)`. Every other target, including 32-bit arm, riscv32, ppc32, mips32 and sparc32, gives `_BitInt(96)` 16 bytes with padding, so the case still exercises the padding-bit Mandate everywhere except 32-bit x86. `sizeof` is not available to the preprocessor, so the guard is a target check rather than a direct has-padding predicate. Assisted-by: Claude (Anthropic) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Author
Parents
Loading