1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -O0 -run-pass=legalizer %s -o - | FileCheck %s
3 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer %s -o - | FileCheck %s
6 name: atomic_cmpxchg_global_i32
10 liveins: $sgpr0_sgpr1, $sgpr2, $sgpr3
11 ; CHECK-LABEL: name: atomic_cmpxchg_global_i32
12 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr1
13 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr2
14 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr3
15 ; CHECK: [[ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_ATOMIC_CMPXCHG [[COPY]](p1), [[COPY1]], [[COPY2]] :: (load store seq_cst 4, addrspace 1)
16 %0:_(p1) = COPY $sgpr0_sgpr1
17 %1:_(s32) = COPY $sgpr2
18 %2:_(s32) = COPY $sgpr3
19 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst 4, addrspace 1)
23 name: atomic_cmpxchg_local_i32
27 liveins: $sgpr0, $sgpr1, $sgpr2
28 ; CHECK-LABEL: name: atomic_cmpxchg_local_i32
29 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $sgpr0
30 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr1
31 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr2
32 ; CHECK: [[ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_ATOMIC_CMPXCHG [[COPY]](p3), [[COPY1]], [[COPY2]] :: (load store seq_cst 4, addrspace 3)
33 %0:_(p3) = COPY $sgpr0
34 %1:_(s32) = COPY $sgpr1
35 %2:_(s32) = COPY $sgpr2
36 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst 4, addrspace 3)
40 name: atomic_cmpxchg_global_i64
44 liveins: $sgpr0_sgpr1, $sgpr2, $sgpr3
45 ; CHECK-LABEL: name: atomic_cmpxchg_global_i64
46 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr1
47 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr2
48 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr3
49 ; CHECK: [[ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_ATOMIC_CMPXCHG [[COPY]](p1), [[COPY1]], [[COPY2]] :: (load store seq_cst 4, addrspace 1)
50 %0:_(p1) = COPY $sgpr0_sgpr1
51 %1:_(s32) = COPY $sgpr2
52 %2:_(s32) = COPY $sgpr3
53 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst 4, addrspace 1)
57 name: atomic_cmpxchg_local_i64
61 liveins: $sgpr0, $sgpr1, $sgpr2
62 ; CHECK-LABEL: name: atomic_cmpxchg_local_i64
63 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $sgpr0
64 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr1
65 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr2
66 ; CHECK: [[ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_ATOMIC_CMPXCHG [[COPY]](p3), [[COPY1]], [[COPY2]] :: (load store seq_cst 4, addrspace 3)
67 %0:_(p3) = COPY $sgpr0
68 %1:_(s32) = COPY $sgpr1
69 %2:_(s32) = COPY $sgpr2
70 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst 4, addrspace 3)