1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
6 name: atomicrmw_sub_global_i32_ss
11 liveins: $sgpr0_sgpr1, $sgpr2
12 ; CHECK-LABEL: name: atomicrmw_sub_global_i32_ss
13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
15 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(p1) = COPY [[COPY]](p1)
16 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
17 ; CHECK: [[ATOMICRMW_SUB:%[0-9]+]]:vgpr(s32) = G_ATOMICRMW_SUB [[COPY2]](p1), [[COPY3]] :: (load store seq_cst 4, addrspace 1)
18 %0:_(p1) = COPY $sgpr0_sgpr1
19 %1:_(s32) = COPY $sgpr2
20 %2:_(s32) = G_ATOMICRMW_SUB %0, %1 :: (load store seq_cst 4, addrspace 1)
24 name: atomicrmw_sub_flat_i32_ss
29 liveins: $sgpr0_sgpr1, $sgpr2
30 ; CHECK-LABEL: name: atomicrmw_sub_flat_i32_ss
31 ; CHECK: [[COPY:%[0-9]+]]:sgpr(p0) = COPY $sgpr0_sgpr1
32 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
33 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(p0) = COPY [[COPY]](p0)
34 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
35 ; CHECK: [[ATOMICRMW_SUB:%[0-9]+]]:vgpr(s32) = G_ATOMICRMW_SUB [[COPY2]](p0), [[COPY3]] :: (load store seq_cst 4)
36 %0:_(p0) = COPY $sgpr0_sgpr1
37 %1:_(s32) = COPY $sgpr2
38 %2:_(s32) = G_ATOMICRMW_SUB %0, %1 :: (load store seq_cst 4, addrspace 0)
42 name: atomicrmw_sub_local_i32_ss
47 liveins: $sgpr0, $sgpr1
48 ; CHECK-LABEL: name: atomicrmw_sub_local_i32_ss
49 ; CHECK: [[COPY:%[0-9]+]]:sgpr(p3) = COPY $sgpr0
50 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
51 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(p3) = COPY [[COPY]](p3)
52 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
53 ; CHECK: [[ATOMICRMW_SUB:%[0-9]+]]:vgpr(s32) = G_ATOMICRMW_SUB [[COPY2]](p3), [[COPY3]] :: (load store seq_cst 4, addrspace 3)
54 %0:_(p3) = COPY $sgpr0
55 %1:_(s32) = COPY $sgpr1
56 %2:_(s32) = G_ATOMICRMW_SUB %0, %1 :: (load store seq_cst 4, addrspace 3)