Skip to content

LLVM data layout for i128 doesn't match Clang's alignment of __int128_t on 64-bit PowerPC, 64-bit SPARC and 64-bit MIPS #102783

Closed

Description

@beetrees

On 64-bit PowerPC, 64-bit SPARC and 64-bit MIPS, Clang gives __int128_t an alignment of 16 whereas the LLVM data layout (implicitly) gives i128 an alignment of 8. This means that LLVM-based compilers that use the LLVM data layout alignment directly (such as rustc) are ABI incompatible with Clang itself. This is the same as a previous bug on x86-64 that was fixed in D86310, just on different targets. As Clang's behaviour matches GCC (and the PowerPC64 ABI specification) the LLVM data layout is what needs to be updated.

Affected architectures:

Activity

  1. added
    clangClang issues not falling into any other category
    on Aug 11, 2024
  2. llvmbot commented on Aug 11, 2024

    @llvmbot
    Member

    @llvm/issue-subscribers-backend-powerpc

    Author: None (beetrees)

    Details On 64-bit PowerPC, 64-bit SPARC and 64-bit MIPS, Clang gives `__int128_t` an alignment of 16 whereas the LLVM data layout (implicitly) gives `i128` an alignment of 8. This means that LLVM-based compilers that use the LLVM data layout alignment directly (such as `rustc`) are ABI incompatible with Clang itself. This is the same as a previous bug on x86-64 that was fixed in [D86310](https://reviews.llvm.org/D86310), just on different targets. As Clang's behaviour matches GCC (and the PowerPC64 ABI specification) the LLVM data layout is what needs to be updated.
  3. llvmbot commented on Aug 11, 2024

    @llvmbot
    Member

    @llvm/issue-subscribers-backend-mips

    Author: None (beetrees)

    Details On 64-bit PowerPC, 64-bit SPARC and 64-bit MIPS, Clang gives `__int128_t` an alignment of 16 whereas the LLVM data layout (implicitly) gives `i128` an alignment of 8. This means that LLVM-based compilers that use the LLVM data layout alignment directly (such as `rustc`) are ABI incompatible with Clang itself. This is the same as a previous bug on x86-64 that was fixed in [D86310](https://reviews.llvm.org/D86310), just on different targets. As Clang's behaviour matches GCC (and the PowerPC64 ABI specification) the LLVM data layout is what needs to be updated.
  4. brad0 commented on Sep 3, 2024

    @brad0
    Contributor
  5. brad0 commented on Sep 3, 2024

    @brad0
    Contributor
  6. 16 remaining items

  7. added a commit that references this issue on Jun 4, 2025
  8. added a commit that references this issue on Jun 4, 2025
  9. added 2 commits that reference this issue on Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions