[all-commits] [llvm/llvm-project] 378629: [flang] Derive target-specific data layout from tr...
anoopkg6 via All-commits
all-commits at lists.llvm.org
Wed Jul 15 11:08:39 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 378629b2200b092fa33e6171e7c749c95ff92e9c
https://github.com/llvm/llvm-project/commit/378629b2200b092fa33e6171e7c749c95ff92e9c
Author: anoopkg6 <anoop.kumar6 at ibm.com>
Date: 2026-07-15 (Wed, 15 Jul 2026)
Changed paths:
M flang/lib/Optimizer/CodeGen/TargetRewrite.cpp
Log Message:
-----------
[flang] Derive target-specific data layout from triple in TargetRewrite (#209649)
When target-rewrite runs without an explicit llvm.data_layout attribute,
it falls back to hardcoded generic default in MLIR (kDefaultDataLayout)
which specifies f128 ABI alignment as 16 bytes. This is incorrect for
targets where f128 ABI alignment differs from its size, such as SystemZ
which requires 8 bytes per the ELF ABI.
The target triple is available in the target-rewrite pass. Fix by
deriving the data layout from the target triple using
triple.computeDataLayout() before falling back to the generic default,
ensuring target-specific alignments are correctly reflected in
dlti.dl_spec.
@uweigand @dominik-steenken
---------
Co-authored-by: anoop.kumar6 at ibm.com <anoopk at b35lp63.lnxne.boe>
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