mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-29 03:37:26 +03:00
llvm: nvptx: Layout update to match LLVM
LLVM upstream switched layouts to support 256-bit vector load/store.
This commit is contained in:
@@ -217,6 +217,10 @@ pub(crate) unsafe fn create_module<'ll>(
|
||||
// LLVM 22.0 updated the default layout on avr: https://github.com/llvm/llvm-project/pull/153010
|
||||
target_data_layout = target_data_layout.replace("n8:16", "n8")
|
||||
}
|
||||
if sess.target.arch == "nvptx64" {
|
||||
// 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", "");
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure the data-layout values hardcoded remain the defaults.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
arch: "nvptx64".into(),
|
||||
data_layout: "e-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64".into(),
|
||||
data_layout: "e-p6:32:32-i64:64-i128:128-i256:256-v16:16-v32:32-n16:32:64".into(),
|
||||
llvm_target: "nvptx64-nvidia-cuda".into(),
|
||||
metadata: TargetMetadata {
|
||||
description: Some("--emit=asm generates PTX code that runs on NVIDIA GPUs".into()),
|
||||
|
||||
Reference in New Issue
Block a user