[all-commits] [llvm/llvm-project] 756884: [libc++][test] Drop _BitInt(96) byteswap padding c...

Xavier Roche via All-commits all-commits at lists.llvm.org
Sun Jun 28 08:14:28 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 756884ca8a90b4dfbfb71f715198ddf70cbcd819
      https://github.com/llvm/llvm-project/commit/756884ca8a90b4dfbfb71f715198ddf70cbcd819
  Author: Xavier Roche <xavier.roche at algolia.com>
  Date:   2026-06-28 (Sun, 28 Jun 2026)

  Changed paths:
    M libcxx/test/std/numerics/bit/byteswap.verify.cpp

  Log Message:
  -----------
  [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 at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list