Rollup merge of #149880 - durin42:llvm-22-ppc-aix-layout, r=nikic

rustc_codegen_llvm: update alignment for double on AIX

This was recently fixed upstream in LLVM, so we update our default layout to match.

````@rustbot```` label: +llvm-main
This commit is contained in:
Jonathan Brouwer 2026-01-06 16:19:39 +01:00 committed by GitHub
commit dea8b8b3c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -211,6 +211,10 @@ pub(crate) unsafe fn create_module<'ll>(
// LLVM 22 updated the NVPTX layout to indicate 256-bit vector load/store: https://github.com/llvm/llvm-project/pull/155198
target_data_layout = target_data_layout.replace("-i256:256", "");
}
if sess.target.arch == Arch::PowerPC64 {
// LLVM 22 updated the ABI alignment for double on AIX: https://github.com/llvm/llvm-project/pull/144673
target_data_layout = target_data_layout.replace("-f64:32:64", "");
}
}
// Ensure the data-layout values hardcoded remain the defaults.

View file

@ -17,7 +17,8 @@ pub(crate) fn target() -> Target {
std: None, // ?
},
pointer_width: 64,
data_layout: "E-m:a-Fi64-i64:64-i128:128-n32:64-S128-v256:256:256-v512:512:512".into(),
data_layout: "E-m:a-Fi64-i64:64-i128:128-n32:64-f64:32:64-S128-v256:256:256-v512:512:512"
.into(),
arch: Arch::PowerPC64,
options: base,
}