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: insert_vector_elt_v4i32_s_s_s
11 liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, $sgpr5
13 ; CHECK-LABEL: name: insert_vector_elt_v4i32_s_s_s
14 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
15 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr4
16 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr5
17 ; CHECK: [[IVEC:%[0-9]+]]:sgpr(<4 x s32>) = G_INSERT_VECTOR_ELT [[COPY]], [[COPY1]](s32), [[COPY2]](s32)
18 ; CHECK: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[IVEC]](<4 x s32>)
19 %0:_(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
20 %1:_(s32) = COPY $sgpr4
21 %2:_(s32) = COPY $sgpr5
22 %3:_(<4 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
23 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %3
27 name: insert_vector_elt_v4i32_v_s_s
32 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $sgpr0, $sgpr1
34 ; CHECK-LABEL: name: insert_vector_elt_v4i32_v_s_s
35 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
36 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
37 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
38 ; CHECK: [[IVEC:%[0-9]+]]:vgpr(<4 x s32>) = G_INSERT_VECTOR_ELT [[COPY]], [[COPY1]](s32), [[COPY2]](s32)
39 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[IVEC]](<4 x s32>)
40 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
41 %1:_(s32) = COPY $sgpr0
42 %2:_(s32) = COPY $sgpr1
43 %3:_(<4 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
44 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
48 name: insert_vector_elt_v4i32_s_v_s
53 liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $vgpr0, $sgpr4
55 ; CHECK-LABEL: name: insert_vector_elt_v4i32_s_v_s
56 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
57 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
58 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr4
59 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(<4 x s32>) = COPY [[COPY]](<4 x s32>)
60 ; CHECK: [[IVEC:%[0-9]+]]:vgpr(<4 x s32>) = G_INSERT_VECTOR_ELT [[COPY3]], [[COPY1]](s32), [[COPY2]](s32)
61 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[IVEC]](<4 x s32>)
62 %0:_(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
63 %1:_(s32) = COPY $vgpr0
64 %2:_(s32) = COPY $sgpr4
65 %3:_(<4 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
66 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
70 name: insert_vector_elt_v4i32_s_s_v
75 liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, $vgpr0
77 ; CHECK-LABEL: name: insert_vector_elt_v4i32_s_s_v
78 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
79 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr4
80 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
81 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(<4 x s32>) = COPY [[COPY]](<4 x s32>)
82 ; CHECK: [[IVEC:%[0-9]+]]:vgpr(<4 x s32>) = G_INSERT_VECTOR_ELT [[COPY3]], [[COPY1]](s32), [[COPY2]](s32)
83 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[IVEC]](<4 x s32>)
84 %0:_(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
85 %1:_(s32) = COPY $sgpr4
86 %2:_(s32) = COPY $vgpr0
87 %3:_(<4 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
88 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
92 name: insert_vector_elt_v4i32_s_v_v
97 liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $vgpr0, $vgpr1
99 ; CHECK-LABEL: name: insert_vector_elt_v4i32_s_v_v
100 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
101 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
102 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
103 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(<4 x s32>) = COPY [[COPY]](<4 x s32>)
104 ; CHECK: [[IVEC:%[0-9]+]]:vgpr(<4 x s32>) = G_INSERT_VECTOR_ELT [[COPY3]], [[COPY1]](s32), [[COPY2]](s32)
105 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[IVEC]](<4 x s32>)
106 %0:_(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
107 %1:_(s32) = COPY $vgpr0
108 %2:_(s32) = COPY $vgpr1
109 %3:_(<4 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
110 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
114 name: insert_vector_elt_var_v4i32_v_s_v
119 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $sgpr4, $vgpr0
121 ; CHECK-LABEL: name: insert_vector_elt_var_v4i32_v_s_v
122 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
123 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr4
124 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
125 ; CHECK: [[IVEC:%[0-9]+]]:vgpr(<4 x s32>) = G_INSERT_VECTOR_ELT [[COPY]], [[COPY1]](s32), [[COPY2]](s32)
126 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[IVEC]](<4 x s32>)
127 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
128 %1:_(s32) = COPY $sgpr4
129 %2:_(s32) = COPY $vgpr0
130 %3:_(<4 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
131 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
135 name: insert_vector_elt_var_v4i32_v_v_s
140 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4, $sgpr0
142 ; CHECK-LABEL: name: insert_vector_elt_var_v4i32_v_v_s
143 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
144 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
145 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
146 ; CHECK: [[IVEC:%[0-9]+]]:vgpr(<4 x s32>) = G_INSERT_VECTOR_ELT [[COPY]], [[COPY1]](s32), [[COPY2]](s32)
147 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[IVEC]](<4 x s32>)
148 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
149 %1:_(s32) = COPY $vgpr0
150 %2:_(s32) = COPY $sgpr0
151 %3:_(<4 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
152 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
156 name: insert_vector_elt_var_v4i32_v_v_v
161 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4, $vgpr5
163 ; CHECK-LABEL: name: insert_vector_elt_var_v4i32_v_v_v
164 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
165 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr4
166 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr5
167 ; CHECK: [[IVEC:%[0-9]+]]:vgpr(<4 x s32>) = G_INSERT_VECTOR_ELT [[COPY]], [[COPY1]](s32), [[COPY2]](s32)
168 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[IVEC]](<4 x s32>)
169 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
170 %1:_(s32) = COPY $vgpr4
171 %2:_(s32) = COPY $vgpr5
172 %3:_(<4 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
173 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3