[all-commits] [llvm/llvm-project] c5ab70: [WebAssembly] Add `-i128:128` to the `datalayout` ...
Dan Gohman via All-commits
all-commits at lists.llvm.org
Tue Dec 10 09:22:20 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c5ab70c508457eaece5d7ff4ab79a2f90bc67f06
https://github.com/llvm/llvm-project/commit/c5ab70c508457eaece5d7ff4ab79a2f90bc67f06
Author: Dan Gohman <dev at sunfishcode.online>
Date: 2024-12-10 (Tue, 10 Dec 2024)
Changed paths:
M clang/lib/Basic/Targets/WebAssembly.h
M clang/test/CodeGen/target-data.c
M llvm/lib/IR/AutoUpgrade.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
A llvm/test/CodeGen/WebAssembly/data-align.ll
M llvm/test/CodeGen/WebAssembly/multi-return.ll
M llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp
Log Message:
-----------
[WebAssembly] Add `-i128:128` to the `datalayout` string. (#119204)
Clang [defaults to aligning `__int128_t` to 16 bytes], while LLVM
`datalayout` strings [default to aligning `i128` to 8 bytes]. Wasm is
currently using the defaults for both, so it's inconsistent. Fix this by
adding `-i128:128` to Wasm's `datalayout` string so that it aligns
`i128` to 16 bytes too.
This is similar to
[llvm/llvm-project at dbad963](https://github.com/llvm/llvm-project/commit/dbad963a69fd7b16c6838f81b61167fbf00a413c)
for SPARC.
This fixes rust-lang/rust#133991; see that issue for further discussion.
[defaults to aligning `__int128_t` to 16 bytes]:
https://github.com/llvm/llvm-project/blob/f8b4182f076f8fe55f9d5f617b5a25008a77b22f/clang/lib/Basic/TargetInfo.cpp#L77
[default to aligning `i128` to 8 bytes]:
https://llvm.org/docs/LangRef.html#langref-datalayout
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