1 ; RUN: not llc -mtriple=amdgcn-amd- -mcpu=gfx803 < %s 2>&1 | FileCheck %s
2 ; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < %s 2>&1 | FileCheck %s
3 ; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 < %s 2>&1 | FileCheck %s
4 ; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < %s 2>&1 | FileCheck %s
6 ; CHECK: error: <unknown>:0:0: in function invalid_fence void (): Unsupported atomic synchronization scope
7 define amdgpu_kernel void @invalid_fence() {
9 fence syncscope("invalid") seq_cst
13 ; CHECK: error: <unknown>:0:0: in function invalid_load void (ptr, ptr): Unsupported non-inclusive atomic synchronization scope
14 define amdgpu_kernel void @invalid_load(
17 %val = load atomic i32, ptr %in syncscope("invalid") seq_cst, align 4
18 store i32 %val, ptr %out
22 ; CHECK: error: <unknown>:0:0: in function invalid_store void (i32, ptr): Unsupported non-inclusive atomic synchronization scope
23 define amdgpu_kernel void @invalid_store(
26 store atomic i32 %in, ptr %out syncscope("invalid") seq_cst, align 4
30 ; CHECK: error: <unknown>:0:0: in function invalid_cmpxchg void (ptr, i32, i32): Unsupported non-inclusive atomic synchronization scope
31 define amdgpu_kernel void @invalid_cmpxchg(
32 ptr %out, i32 %in, i32 %old) {
34 %gep = getelementptr i32, ptr %out, i32 4
35 %val = cmpxchg volatile ptr %gep, i32 %old, i32 %in syncscope("invalid") seq_cst seq_cst
39 ; CHECK: error: <unknown>:0:0: in function invalid_rmw void (ptr, i32): Unsupported non-inclusive atomic synchronization scope
40 define amdgpu_kernel void @invalid_rmw(
43 %val = atomicrmw volatile xchg ptr %out, i32 %in syncscope("invalid") seq_cst