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
11 liveins: $sgpr0, $sgpr1, $sgpr2
12 ; CHECK-LABEL: name: writelane_sss
13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
15 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
16 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
17 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), [[COPY]](s32), [[COPY1]](s32), [[COPY3]](s32)
18 %0:_(s32) = COPY $sgpr0
19 %1:_(s32) = COPY $sgpr1
20 %2:_(s32) = COPY $sgpr2
21 %3:_(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), %0, %1, %2
30 liveins: $sgpr0, $sgpr1, $vgpr0
31 ; CHECK-LABEL: name: writelane_ssv
32 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
33 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
34 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
35 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), [[COPY]](s32), [[COPY1]](s32), [[COPY2]](s32)
36 %0:_(s32) = COPY $sgpr0
37 %1:_(s32) = COPY $sgpr1
38 %2:_(s32) = COPY $vgpr0
39 %3:_(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), %0, %1, %2
48 liveins: $sgpr0, $vgpr0, $vgpr1
49 ; CHECK-LABEL: name: writelane_vsv
50 ; CHECK: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
51 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
52 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
53 ; CHECK: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sreg_32_xm0 = V_READFIRSTLANE_B32 [[COPY]](s32), implicit $exec
54 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), [[V_READFIRSTLANE_B32_]], [[COPY1]](s32), [[COPY2]](s32)
55 %0:_(s32) = COPY $vgpr0
56 %1:_(s32) = COPY $sgpr0
57 %2:_(s32) = COPY $vgpr1
58 %3:_(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), %0, %1, %2
67 liveins: $vgpr0, $vgpr1
68 ; CHECK-LABEL: name: writelane_vvv
69 ; CHECK: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
70 ; CHECK: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
71 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
72 ; CHECK: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sreg_32_xm0 = V_READFIRSTLANE_B32 [[COPY]](s32), implicit $exec
73 ; CHECK: [[V_READFIRSTLANE_B32_1:%[0-9]+]]:sreg_32_xm0 = V_READFIRSTLANE_B32 [[COPY1]](s32), implicit $exec
74 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), [[V_READFIRSTLANE_B32_]], [[V_READFIRSTLANE_B32_1]], [[COPY2]](s32)
75 %0:_(s32) = COPY $vgpr0
76 %1:_(s32) = COPY $vgpr1
77 %2:_(s32) = COPY $vgpr2
78 %3:_(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), %0, %1, %2
87 liveins: $sgpr0, $vgpr0, $vgpr1
88 ; CHECK-LABEL: name: writelane_svv
89 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
90 ; CHECK: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
91 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
92 ; CHECK: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sreg_32_xm0 = V_READFIRSTLANE_B32 [[COPY1]](s32), implicit $exec
93 ; CHECK: [[INT:%[0-9]+]]:vgpr(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), [[COPY]](s32), [[V_READFIRSTLANE_B32_]], [[COPY2]](s32)
94 %0:_(s32) = COPY $sgpr0
95 %1:_(s32) = COPY $vgpr0
96 %2:_(s32) = COPY $vgpr1
97 %3:_(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.writelane), %0, %1, %2