1 ; RUN: not llc -mtriple=amdgcn-amd- -mcpu=gfx803 -verify-machineinstrs < %s 2>&1 | FileCheck %s
2 ; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -verify-machineinstrs < %s 2>&1 | FileCheck %s
3 ; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -verify-machineinstrs < %s 2>&1 | FileCheck %s
5 ; CHECK: error: <unknown>:0:0: in function invalid_fence void (): Unsupported atomic synchronization scope
6 define amdgpu_kernel void @invalid_fence() {
8 fence syncscope("invalid") seq_cst
12 ; CHECK: error: <unknown>:0:0: in function invalid_load void (i32*, i32*): Unsupported non-inclusive atomic synchronization scope
13 define amdgpu_kernel void @invalid_load(
14 i32* %in, i32* %out) {
16 %val = load atomic i32, i32* %in syncscope("invalid") seq_cst, align 4
17 store i32 %val, i32* %out
21 ; CHECK: error: <unknown>:0:0: in function invalid_store void (i32, i32*): Unsupported non-inclusive atomic synchronization scope
22 define amdgpu_kernel void @invalid_store(
25 store atomic i32 %in, i32* %out syncscope("invalid") seq_cst, align 4
29 ; CHECK: error: <unknown>:0:0: in function invalid_cmpxchg void (i32*, i32, i32): Unsupported non-inclusive atomic synchronization scope
30 define amdgpu_kernel void @invalid_cmpxchg(
31 i32* %out, i32 %in, i32 %old) {
33 %gep = getelementptr i32, i32* %out, i32 4
34 %val = cmpxchg volatile i32* %gep, i32 %old, i32 %in syncscope("invalid") seq_cst seq_cst
38 ; CHECK: error: <unknown>:0:0: in function invalid_rmw void (i32*, i32): Unsupported non-inclusive atomic synchronization scope
39 define amdgpu_kernel void @invalid_rmw(
42 %val = atomicrmw volatile xchg i32* %out, i32 %in syncscope("invalid") seq_cst