Adjust the s390x data layout for LLVM 16

LLVM [D131158] changed the SystemZ data layout to always set 64-bit
vector alignment, which used to be conditional on the "vector" feature.

[D131158]: https://reviews.llvm.org/D131158
This commit is contained in:
Josh Stone 2022-09-29 18:18:26 -07:00
parent 9c56d9d6fe
commit 2e7a964485
3 changed files with 13 additions and 8 deletions

View file

@ -154,6 +154,11 @@ pub unsafe fn create_module<'ll>(
target_data_layout = target_data_layout.replace("-p10:8:8-p20:8:8", "");
}
}
if llvm_version < (16, 0, 0) {
if sess.target.arch == "s390x" {
target_data_layout = target_data_layout.replace("-v128:64", "");
}
}
// Ensure the data-layout values hardcoded remain the defaults.
if sess.target.is_builtin {