about summary refs log tree commit diff
path: root/tests/codegen-llvm
diff options
context:
space:
mode:
authorFlakebi <flakebi@t-online.de>2025-01-21 23:21:29 +0100
committerFlakebi <flakebi@t-online.de>2025-09-03 08:40:58 +0200
commit15c6585e5c5352746302737c0a55de96d9514fd3 (patch)
treee02aafb5fe86eb1ebbe9a361daea7c8424176096 /tests/codegen-llvm
parent485bdafdcfb340e74b7342d716b2135d4c6c8ca1 (diff)
downloadrust-15c6585e5c5352746302737c0a55de96d9514fd3.tar.gz
rust-15c6585e5c5352746302737c0a55de96d9514fd3.zip
Add amdgpu to gpu-kernel test
Check that the gpu-kernel calling convention translates to
`amdgpu_kernel` when compiling for the amdgpu target.
Diffstat (limited to 'tests/codegen-llvm')
-rw-r--r--tests/codegen-llvm/gpu-kernel-abi.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/codegen-llvm/gpu-kernel-abi.rs b/tests/codegen-llvm/gpu-kernel-abi.rs
index 8ac376d9338..d5a357ef655 100644
--- a/tests/codegen-llvm/gpu-kernel-abi.rs
+++ b/tests/codegen-llvm/gpu-kernel-abi.rs
@@ -1,7 +1,9 @@
 // Checks that the gpu-kernel calling convention correctly translates to LLVM calling conventions.
 
 //@ add-core-stubs
-//@ revisions: nvptx
+//@ revisions: amdgpu nvptx
+//@ [amdgpu] compile-flags: --crate-type=rlib --target=amdgcn-amd-amdhsa -Ctarget-cpu=gfx900
+//@ [amdgpu] needs-llvm-components: amdgpu
 //@ [nvptx] compile-flags: --crate-type=rlib --target=nvptx64-nvidia-cuda
 //@ [nvptx] needs-llvm-components: nvptx
 #![feature(no_core, lang_items, abi_gpu_kernel)]
@@ -10,6 +12,7 @@
 extern crate minicore;
 use minicore::*;
 
+// amdgpu: define amdgpu_kernel void @fun(i32
 // nvptx: define ptx_kernel void @fun(i32
 #[no_mangle]
 pub extern "gpu-kernel" fn fun(_: i32) {}