1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck %s
3 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck %s
11 liveins: $sgpr0, $sgpr1, $sgpr2
12 ; CHECK-LABEL: name: fshr_sss
13 ; CHECK: liveins: $sgpr0, $sgpr1, $sgpr2
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
16 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
17 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
18 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
19 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
20 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
21 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY3]], [[COPY4]], [[COPY5]](s32)
22 %0:_(s32) = COPY $sgpr0
23 %1:_(s32) = COPY $sgpr1
24 %2:_(s32) = COPY $sgpr2
25 %3:_(s32) = G_FSHR %0, %1, %2
33 liveins: $vgpr0, $sgpr0, $sgpr1
34 ; CHECK-LABEL: name: fshr_vss
35 ; CHECK: liveins: $vgpr0, $sgpr0, $sgpr1
37 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
38 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
39 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
40 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
41 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
42 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY]], [[COPY3]], [[COPY4]](s32)
43 %0:_(s32) = COPY $vgpr0
44 %1:_(s32) = COPY $sgpr0
45 %2:_(s32) = COPY $sgpr1
46 %3:_(s32) = G_FSHR %0, %1, %2
54 liveins: $sgpr0, $vgpr0, $sgpr1
55 ; CHECK-LABEL: name: fshr_svs
56 ; CHECK: liveins: $sgpr0, $vgpr0, $sgpr1
58 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
59 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
60 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
61 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
62 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
63 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY3]], [[COPY1]], [[COPY4]](s32)
64 %0:_(s32) = COPY $sgpr0
65 %1:_(s32) = COPY $vgpr0
66 %2:_(s32) = COPY $sgpr1
67 %3:_(s32) = G_FSHR %0, %1, %2
75 liveins: $sgpr0, $sgpr1, $vgpr0
76 ; CHECK-LABEL: name: fshr_ssv
77 ; CHECK: liveins: $sgpr0, $sgpr1, $vgpr0
79 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
80 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
81 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
82 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
83 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
84 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY3]], [[COPY4]], [[COPY2]](s32)
85 %0:_(s32) = COPY $sgpr0
86 %1:_(s32) = COPY $sgpr1
87 %2:_(s32) = COPY $vgpr0
88 %3:_(s32) = G_FSHR %0, %1, %2
96 liveins: $vgpr0, $vgpr1, $sgpr0
97 ; CHECK-LABEL: name: fshr_vvs
98 ; CHECK: liveins: $vgpr0, $vgpr1, $sgpr0
100 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
101 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
102 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
103 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
104 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY]], [[COPY1]], [[COPY3]](s32)
105 %0:_(s32) = COPY $vgpr0
106 %1:_(s32) = COPY $vgpr1
107 %2:_(s32) = COPY $sgpr0
108 %3:_(s32) = G_FSHR %0, %1, %2
116 liveins: $vgpr0, $sgpr0, $vgpr1
117 ; CHECK-LABEL: name: fshr_vsv
118 ; CHECK: liveins: $vgpr0, $sgpr0, $vgpr1
120 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
121 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
122 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
123 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
124 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY]], [[COPY3]], [[COPY2]](s32)
125 %0:_(s32) = COPY $vgpr0
126 %1:_(s32) = COPY $sgpr1
127 %2:_(s32) = COPY $vgpr1
128 %3:_(s32) = G_FSHR %0, %1, %2
136 liveins: $sgpr0, $vgpr0, $vgpr1
137 ; CHECK-LABEL: name: fshr_svv
138 ; CHECK: liveins: $sgpr0, $vgpr0, $vgpr1
140 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
141 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
142 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
143 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
144 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY3]], [[COPY1]], [[COPY2]](s32)
145 %0:_(s32) = COPY $sgpr0
146 %1:_(s32) = COPY $vgpr0
147 %2:_(s32) = COPY $vgpr1
148 %3:_(s32) = G_FSHR %0, %1, %2
156 liveins: $vgpr0, $vgpr1, $vgpr2
157 ; CHECK-LABEL: name: fshr_vvv
158 ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2
160 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
161 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
162 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
163 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:vgpr(s32) = G_FSHR [[COPY]], [[COPY1]], [[COPY2]](s32)
164 %0:_(s32) = COPY $vgpr0
165 %1:_(s32) = COPY $vgpr1
166 %2:_(s32) = COPY $vgpr2
167 %3:_(s32) = G_FSHR %0, %1, %2