File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
rustc_target/src/spec/targets Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use crate::spec::{
66pub ( 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 ( ) ) ,
You can’t perform that action at this time.
0 commit comments