1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck %s
6 name: ds_ordered_add_ss
11 liveins: $sgpr0, $sgpr1
12 ; CHECK-LABEL: name: ds_ordered_add_ss
13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
15 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
16 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.ds.ordered.add), [[COPY]](s32), [[COPY2]](s32), 0, 0, 0, 0, 0, 0
17 %0:_(s32) = COPY $sgpr0
18 %1:_(s32) = COPY $sgpr1
19 %2:_(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.ds.ordered.add), %0, %1, 0, 0, 0, 0, 0, 0
23 name: ds_ordered_add_vs
28 liveins: $vgpr0, $sgpr0
29 ; CHECK-LABEL: name: ds_ordered_add_vs
30 ; CHECK: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
31 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
32 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
33 ; CHECK: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sreg_32_xm0 = V_READFIRSTLANE_B32 [[COPY]](s32), implicit $exec
34 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.ds.ordered.add), [[V_READFIRSTLANE_B32_]], [[COPY2]](s32), 0, 0, 0, 0, 0, 0
35 %0:_(s32) = COPY $vgpr0
36 %1:_(s32) = COPY $sgpr0
37 %2:_(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.ds.ordered.add), %0, %1, 0, 0, 0, 0, 0, 0
41 name: ds_ordered_add_vv
46 liveins: $vgpr0, $vgpr1
47 ; CHECK-LABEL: name: ds_ordered_add_vv
48 ; CHECK: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
49 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
50 ; CHECK: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sreg_32_xm0 = V_READFIRSTLANE_B32 [[COPY]](s32), implicit $exec
51 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.ds.ordered.add), [[V_READFIRSTLANE_B32_]], [[COPY1]](s32), 0, 0, 0, 0, 0, 0
52 %0:_(s32) = COPY $vgpr0
53 %1:_(s32) = COPY $vgpr1
54 %2:_(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.ds.ordered.add), %0, %1, 0, 0, 0, 0, 0, 0
58 name: ds_ordered_add_sv
63 liveins: $vgpr0, $sgpr0
64 ; CHECK-LABEL: name: ds_ordered_add_sv
65 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
66 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
67 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.ds.ordered.add), [[COPY]](s32), [[COPY1]](s32), 0, 0, 0, 0, 0, 0
68 %0:_(s32) = COPY $sgpr0
69 %1:_(s32) = COPY $vgpr0
70 %2:_(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.ds.ordered.add), %0, %1, 0, 0, 0, 0, 0, 0