Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a3a0e90

Browse files
Rollup merge of #146134 - maurer:nvptx-sync, r=durin42
llvm: nvptx: Layout update to match LLVM LLVM upstream switched layouts to support 256-bit vector load/store. `@rustbot` label llvm-main r? durin42
2 parents ebbefbe + 5d9f8fc commit a3a0e90

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ pub(crate) unsafe fn create_module<'ll>(
217217
// LLVM 22.0 updated the default layout on avr: https://github.com/llvm/llvm-project/pull/153010
218218
target_data_layout = target_data_layout.replace("n8:16", "n8")
219219
}
220+
if sess.target.arch == "nvptx64" {
221+
// LLVM 22 updated the NVPTX layout to indicate 256-bit vector load/store: https://github.com/llvm/llvm-project/pull/155198
222+
target_data_layout = target_data_layout.replace("-i256:256", "");
223+
}
220224
}
221225

222226
// Ensure the data-layout values hardcoded remain the defaults.

‎compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::spec::{
66
pub(crate) fn target() -> Target {
77
Target {
88
arch: "nvptx64".into(),
9-
data_layout: "e-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64".into(),
9+
data_layout: "e-p6:32:32-i64:64-i128:128-i256:256-v16:16-v32:32-n16:32:64".into(),
1010
llvm_target: "nvptx64-nvidia-cuda".into(),
1111
metadata: TargetMetadata {
1212
description: Some("--emit=asm generates PTX code that runs on NVIDIA GPUs".into()),

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /