Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/auxiliary/minicore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,14 @@ impl Add<isize> 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<T>(_: *mut T) {}
Expand Down
9 changes: 9 additions & 0 deletions tests/codegen-llvm/amdgpu-addrspacecast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
5 changes: 4 additions & 1 deletion tests/codegen-llvm/gpu-kernel-abi.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand All @@ -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) {}
Loading