diff --git a/tests/auxiliary/minicore.rs b/tests/auxiliary/minicore.rs index da880100a10cd..4f4c653cb46e7 100644 --- a/tests/auxiliary/minicore.rs +++ b/tests/auxiliary/minicore.rs @@ -179,7 +179,14 @@ impl Add for isize { #[lang = "sync"] trait Sync {} -impl Sync for u8 {} +impl_marker_trait!( + Sync => [ + char, bool, + isize, i8, i16, i32, i64, i128, + usize, u8, u16, u32, u64, u128, + f16, f32, f64, f128, + ] +); #[lang = "drop_in_place"] fn drop_in_place(_: *mut T) {} diff --git a/tests/codegen-llvm/amdgpu-addrspacecast.rs b/tests/codegen-llvm/amdgpu-addrspacecast.rs index 7fe630a7efa0e..829133de00d8b 100644 --- a/tests/codegen-llvm/amdgpu-addrspacecast.rs +++ b/tests/codegen-llvm/amdgpu-addrspacecast.rs @@ -16,3 +16,12 @@ pub fn ref_of_local(f: fn(&i32)) { let i = 0; f(&i); } + +// CHECK-LABEL: @ref_of_global +// CHECK: addrspacecast (ptr addrspace(1) @I to ptr) +#[no_mangle] +pub fn ref_of_global(f: fn(&i32)) { + #[no_mangle] + static I: i32 = 0; + f(&I); +} diff --git a/tests/codegen-llvm/gpu-kernel-abi.rs b/tests/codegen-llvm/gpu-kernel-abi.rs index 8ac376d93381b..d5a357ef65529 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) {}