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 4 5--- 6name: atomicrmw_max_global_i32 7 8body: | 9 bb.0: 10 liveins: $sgpr0_sgpr1, $sgpr2 11 ; CHECK-LABEL: name: atomicrmw_max_global_i32 12 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr1 13 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr2 14 ; CHECK: [[ATOMICRMW_MAX:%[0-9]+]]:_(s32) = G_ATOMICRMW_MAX [[COPY]](p1), [[COPY1]] :: (load store seq_cst 4, addrspace 1) 15 %0:_(p1) = COPY $sgpr0_sgpr1 16 %1:_(s32) = COPY $sgpr2 17 %2:_(s32) = G_ATOMICRMW_MAX %0, %1 :: (load store seq_cst 4, addrspace 1) 18... 19 20--- 21name: atomicrmw_max_local_i32 22 23body: | 24 bb.0: 25 liveins: $sgpr0, $sgpr1 26 ; CHECK-LABEL: name: atomicrmw_max_local_i32 27 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $sgpr0 28 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr1 29 ; CHECK: [[ATOMICRMW_MAX:%[0-9]+]]:_(s32) = G_ATOMICRMW_MAX [[COPY]](p3), [[COPY1]] :: (load store seq_cst 4, addrspace 3) 30 %0:_(p3) = COPY $sgpr0 31 %1:_(s32) = COPY $sgpr1 32 %2:_(s32) = G_ATOMICRMW_MAX %0, %1 :: (load store seq_cst 4, addrspace 3) 33... 34 35--- 36name: atomicrmw_max_global_i64 37 38body: | 39 bb.0: 40 liveins: $sgpr0_sgpr1, $sgpr2 41 ; CHECK-LABEL: name: atomicrmw_max_global_i64 42 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr1 43 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr2 44 ; CHECK: [[ATOMICRMW_MAX:%[0-9]+]]:_(s32) = G_ATOMICRMW_MAX [[COPY]](p1), [[COPY1]] :: (load store seq_cst 4, addrspace 1) 45 %0:_(p1) = COPY $sgpr0_sgpr1 46 %1:_(s32) = COPY $sgpr2 47 %2:_(s32) = G_ATOMICRMW_MAX %0, %1 :: (load store seq_cst 4, addrspace 1) 48... 49 50--- 51name: atomicrmw_max_local_i64 52 53body: | 54 bb.0: 55 liveins: $sgpr0, $sgpr1 56 ; CHECK-LABEL: name: atomicrmw_max_local_i64 57 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $sgpr0 58 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr1 59 ; CHECK: [[ATOMICRMW_MAX:%[0-9]+]]:_(s32) = G_ATOMICRMW_MAX [[COPY]](p3), [[COPY1]] :: (load store seq_cst 4, addrspace 3) 60 %0:_(p3) = COPY $sgpr0 61 %1:_(s32) = COPY $sgpr1 62 %2:_(s32) = G_ATOMICRMW_MAX %0, %1 :: (load store seq_cst 4, addrspace 3) 63... 64