aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-07-08 10:20:43 +0200
committerGitHub <noreply@github.com>2025-07-08 10:20:43 +0200
commit18f7655178a69daa52f4d4ef56169b90efc7f601 (patch)
tree838d27e41f3c0d81db1a131e8f0e735f1075bbd7 /clang/lib/CodeGen/CodeGenModule.cpp
parentae496bfac0c34c511775229e94a1439fe8ee4867 (diff)
downloadllvm-18f7655178a69daa52f4d4ef56169b90efc7f601.zip
llvm-18f7655178a69daa52f4d4ef56169b90efc7f601.tar.gz
llvm-18f7655178a69daa52f4d4ef56169b90efc7f601.tar.bz2
[Clang][Wasm] Set __float128 alignment to 64 for emscripten (#146494)
https://reviews.llvm.org/D104808 set the alignment of long double to 64 bits. This is also the alignment specified in the LLVM data layout. However, the alignment of __float128 was left at 128 bits. I assume that this was just an oversight, rather than an intentional divergence. The C ABI document currently does not make any statement about `__float128`: https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index e6d150f..c8866f1 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -388,8 +388,7 @@ static void checkDataLayoutConsistency(const TargetInfo &Target,
llvm::Type::getFloatingPointTy(Context, *Target.LongDoubleFormat),
Target.LongDoubleAlign);
}
- // FIXME: Wasm has a mismatch in f128 alignment between Clang and LLVM.
- if (Target.hasFloat128Type() && !Triple.isWasm())
+ if (Target.hasFloat128Type())
Check("__float128", llvm::Type::getFP128Ty(Context), Target.Float128Align);
if (Target.hasIbm128Type())
Check("__ibm128", llvm::Type::getPPC_FP128Ty(Context), Target.Ibm128Align);