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:
Augie Fackler 2025-12-11 10:31:33 -05:00
parent bd33b83cfd
commit accfc34e43
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,
}