1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -verify-machineinstrs -run-pass=legalizer %s -o - | FileCheck %s
3 # RUN: llc -mtriple=aarch64-unknown-unknown -verify-machineinstrs -run-pass=legalizer -mattr=+cssc %s -o - | FileCheck %s --check-prefix=CHECK-CSSC
7 tracksRegLiveness: true
11 ; CHECK-LABEL: name: v8s8_legal
14 ; CHECK-NEXT: %copy:_(<8 x s8>) = COPY $d0
15 ; CHECK-NEXT: %ctpop:_(<8 x s8>) = G_CTPOP %copy(<8 x s8>)
16 ; CHECK-NEXT: $d0 = COPY %ctpop(<8 x s8>)
17 ; CHECK-NEXT: RET_ReallyLR implicit $d0
19 ; CHECK-CSSC-LABEL: name: v8s8_legal
20 ; CHECK-CSSC: liveins: $d0
21 ; CHECK-CSSC-NEXT: {{ $}}
22 ; CHECK-CSSC-NEXT: %copy:_(<8 x s8>) = COPY $d0
23 ; CHECK-CSSC-NEXT: %ctpop:_(<8 x s8>) = G_CTPOP %copy(<8 x s8>)
24 ; CHECK-CSSC-NEXT: $d0 = COPY %ctpop(<8 x s8>)
25 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $d0
26 %copy:_(<8 x s8>) = COPY $d0
27 %ctpop:_(<8 x s8>) = G_CTPOP %copy(<8 x s8>)
28 $d0 = COPY %ctpop(<8 x s8>)
29 RET_ReallyLR implicit $d0
34 tracksRegLiveness: true
38 ; CHECK-LABEL: name: v16s8_legal
41 ; CHECK-NEXT: %copy:_(<16 x s8>) = COPY $q0
42 ; CHECK-NEXT: %ctpop:_(<16 x s8>) = G_CTPOP %copy(<16 x s8>)
43 ; CHECK-NEXT: $q0 = COPY %ctpop(<16 x s8>)
44 ; CHECK-NEXT: RET_ReallyLR implicit $q0
46 ; CHECK-CSSC-LABEL: name: v16s8_legal
47 ; CHECK-CSSC: liveins: $q0
48 ; CHECK-CSSC-NEXT: {{ $}}
49 ; CHECK-CSSC-NEXT: %copy:_(<16 x s8>) = COPY $q0
50 ; CHECK-CSSC-NEXT: %ctpop:_(<16 x s8>) = G_CTPOP %copy(<16 x s8>)
51 ; CHECK-CSSC-NEXT: $q0 = COPY %ctpop(<16 x s8>)
52 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $q0
53 %copy:_(<16 x s8>) = COPY $q0
54 %ctpop:_(<16 x s8>) = G_CTPOP %copy(<16 x s8>)
55 $q0 = COPY %ctpop(<16 x s8>)
56 RET_ReallyLR implicit $q0
61 tracksRegLiveness: true
65 ; CHECK-LABEL: name: s32_lower
68 ; CHECK-NEXT: %copy:_(s32) = COPY $w0
69 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT %copy(s32)
70 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[ZEXT]](s64)
71 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
72 ; CHECK-NEXT: [[UADDLV:%[0-9]+]]:_(<4 x s32>) = G_UADDLV [[CTPOP]]
73 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
74 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[UADDLV]](<4 x s32>), [[C]](s64)
75 ; CHECK-NEXT: %ctpop:_(s32) = COPY [[EVEC]](s32)
76 ; CHECK-NEXT: $w0 = COPY %ctpop(s32)
77 ; CHECK-NEXT: RET_ReallyLR implicit $w0
79 ; CHECK-CSSC-LABEL: name: s32_lower
80 ; CHECK-CSSC: liveins: $w0
81 ; CHECK-CSSC-NEXT: {{ $}}
82 ; CHECK-CSSC-NEXT: %copy:_(s32) = COPY $w0
83 ; CHECK-CSSC-NEXT: %ctpop:_(s32) = G_CTPOP %copy(s32)
84 ; CHECK-CSSC-NEXT: $w0 = COPY %ctpop(s32)
85 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $w0
86 %copy:_(s32) = COPY $w0
87 %ctpop:_(s32) = G_CTPOP %copy(s32)
88 $w0 = COPY %ctpop(s32)
89 RET_ReallyLR implicit $w0
94 tracksRegLiveness: true
98 ; CHECK-LABEL: name: s64_lower
101 ; CHECK-NEXT: %copy:_(s64) = COPY $x0
102 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST %copy(s64)
103 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
104 ; CHECK-NEXT: [[UADDLV:%[0-9]+]]:_(<4 x s32>) = G_UADDLV [[CTPOP]]
105 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
106 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[UADDLV]](<4 x s32>), [[C]](s64)
107 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[EVEC]](s32)
108 ; CHECK-NEXT: %ctpop:_(s64) = G_ZEXT [[COPY]](s32)
109 ; CHECK-NEXT: $x0 = COPY %ctpop(s64)
110 ; CHECK-NEXT: RET_ReallyLR implicit $x0
112 ; CHECK-CSSC-LABEL: name: s64_lower
113 ; CHECK-CSSC: liveins: $x0
114 ; CHECK-CSSC-NEXT: {{ $}}
115 ; CHECK-CSSC-NEXT: %copy:_(s64) = COPY $x0
116 ; CHECK-CSSC-NEXT: %ctpop:_(s64) = G_CTPOP %copy(s64)
117 ; CHECK-CSSC-NEXT: $x0 = COPY %ctpop(s64)
118 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $x0
119 %copy:_(s64) = COPY $x0
120 %ctpop:_(s64) = G_CTPOP %copy(s64)
121 $x0 = COPY %ctpop(s64)
122 RET_ReallyLR implicit $x0
127 tracksRegLiveness: true
132 ; CHECK-LABEL: name: s128_lower
133 ; CHECK: liveins: $x0, $x1
135 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
136 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
137 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[COPY]](s64), [[COPY1]](s64)
138 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<16 x s8>) = G_BITCAST [[MV]](s128)
139 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<16 x s8>) = G_CTPOP [[BITCAST]](<16 x s8>)
140 ; CHECK-NEXT: [[UADDLV:%[0-9]+]]:_(<4 x s32>) = G_UADDLV [[CTPOP]]
141 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
142 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[UADDLV]](<4 x s32>), [[C]](s64)
143 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[EVEC]](s32)
144 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
145 ; CHECK-NEXT: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY2]](s32), [[C1]](s32)
146 ; CHECK-NEXT: $x0 = COPY [[MV1]](s64)
147 ; CHECK-NEXT: $x1 = COPY [[C]](s64)
148 ; CHECK-NEXT: RET_ReallyLR implicit $x0, implicit $x1
150 ; CHECK-CSSC-LABEL: name: s128_lower
151 ; CHECK-CSSC: liveins: $x0, $x1
152 ; CHECK-CSSC-NEXT: {{ $}}
153 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
154 ; CHECK-CSSC-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
155 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(s64) = G_CTPOP [[COPY]](s64)
156 ; CHECK-CSSC-NEXT: [[CTPOP1:%[0-9]+]]:_(s64) = G_CTPOP [[COPY1]](s64)
157 ; CHECK-CSSC-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[CTPOP]], [[CTPOP1]]
158 ; CHECK-CSSC-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
159 ; CHECK-CSSC-NEXT: $x0 = COPY [[ADD]](s64)
160 ; CHECK-CSSC-NEXT: $x1 = COPY [[C]](s64)
161 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $x0, implicit $x1
164 %0:_(s128) = G_MERGE_VALUES %1(s64), %2(s64)
165 %3:_(s128) = G_CTPOP %0(s128)
166 %4:_(s64), %5:_(s64) = G_UNMERGE_VALUES %3(s128)
169 RET_ReallyLR implicit $x0, implicit $x1
174 tracksRegLiveness: true
179 ; CHECK-LABEL: name: widen_s16
180 ; CHECK: liveins: $w0
182 ; CHECK-NEXT: %copy:_(s32) = COPY $w0
183 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT %copy(s32)
184 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
185 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[ANYEXT]], [[C]]
186 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[AND]](s64)
187 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
188 ; CHECK-NEXT: [[UADDLV:%[0-9]+]]:_(<4 x s32>) = G_UADDLV [[CTPOP]]
189 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
190 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[UADDLV]](<4 x s32>), [[C1]](s64)
191 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[EVEC]](s32)
192 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
193 ; CHECK-NEXT: $w0 = COPY [[COPY1]](s32)
194 ; CHECK-NEXT: RET_ReallyLR implicit $w0
196 ; CHECK-CSSC-LABEL: name: widen_s16
197 ; CHECK-CSSC: liveins: $w0
198 ; CHECK-CSSC-NEXT: {{ $}}
199 ; CHECK-CSSC-NEXT: %copy:_(s32) = COPY $w0
200 ; CHECK-CSSC-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
201 ; CHECK-CSSC-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %copy, [[C]]
202 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(s32) = G_CTPOP [[AND]](s32)
203 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[CTPOP]](s32)
204 ; CHECK-CSSC-NEXT: $w0 = COPY [[COPY]](s32)
205 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $w0
206 %copy:_(s32) = COPY $w0
207 %trunc:_(s16) = G_TRUNC %copy(s32)
208 %ctpop:_(s16) = G_CTPOP %trunc(s16)
209 %ext:_(s32) = G_ANYEXT %ctpop(s16)
211 RET_ReallyLR implicit $w0
216 tracksRegLiveness: true
221 ; CHECK-LABEL: name: widen_s8
222 ; CHECK: liveins: $w0
224 ; CHECK-NEXT: %copy:_(s32) = COPY $w0
225 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT %copy(s32)
226 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
227 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[ANYEXT]], [[C]]
228 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[AND]](s64)
229 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
230 ; CHECK-NEXT: [[UADDLV:%[0-9]+]]:_(<4 x s32>) = G_UADDLV [[CTPOP]]
231 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
232 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[UADDLV]](<4 x s32>), [[C1]](s64)
233 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[EVEC]](s32)
234 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
235 ; CHECK-NEXT: $w0 = COPY [[COPY1]](s32)
236 ; CHECK-NEXT: RET_ReallyLR implicit $w0
238 ; CHECK-CSSC-LABEL: name: widen_s8
239 ; CHECK-CSSC: liveins: $w0
240 ; CHECK-CSSC-NEXT: {{ $}}
241 ; CHECK-CSSC-NEXT: %copy:_(s32) = COPY $w0
242 ; CHECK-CSSC-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
243 ; CHECK-CSSC-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %copy, [[C]]
244 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(s32) = G_CTPOP [[AND]](s32)
245 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[CTPOP]](s32)
246 ; CHECK-CSSC-NEXT: $w0 = COPY [[COPY]](s32)
247 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $w0
248 %copy:_(s32) = COPY $w0
249 %trunc:_(s8) = G_TRUNC %copy(s32)
250 %ctpop:_(s8) = G_CTPOP %trunc(s8)
251 %ext:_(s32) = G_ANYEXT %ctpop(s8)
253 RET_ReallyLR implicit $w0
258 tracksRegLiveness: true
263 ; CHECK-LABEL: name: widen_s3
264 ; CHECK: liveins: $w0
266 ; CHECK-NEXT: %copy:_(s32) = COPY $w0
267 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT %copy(s32)
268 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
269 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[ANYEXT]], [[C]]
270 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[AND]](s64)
271 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
272 ; CHECK-NEXT: [[UADDLV:%[0-9]+]]:_(<4 x s32>) = G_UADDLV [[CTPOP]]
273 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
274 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[UADDLV]](<4 x s32>), [[C1]](s64)
275 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[EVEC]](s32)
276 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
277 ; CHECK-NEXT: $w0 = COPY [[COPY1]](s32)
278 ; CHECK-NEXT: RET_ReallyLR implicit $w0
280 ; CHECK-CSSC-LABEL: name: widen_s3
281 ; CHECK-CSSC: liveins: $w0
282 ; CHECK-CSSC-NEXT: {{ $}}
283 ; CHECK-CSSC-NEXT: %copy:_(s32) = COPY $w0
284 ; CHECK-CSSC-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 7
285 ; CHECK-CSSC-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %copy, [[C]]
286 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(s32) = G_CTPOP [[AND]](s32)
287 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[CTPOP]](s32)
288 ; CHECK-CSSC-NEXT: $w0 = COPY [[COPY]](s32)
289 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $w0
290 %copy:_(s32) = COPY $w0
291 %trunc:_(s3) = G_TRUNC %copy(s32)
292 %ctpop:_(s3) = G_CTPOP %trunc(s3)
293 %ext:_(s32) = G_ANYEXT %ctpop(s3)
295 RET_ReallyLR implicit $w0
299 name: different_sizes
300 tracksRegLiveness: true
304 ; CHECK-LABEL: name: different_sizes
305 ; CHECK: liveins: $w0
307 ; CHECK-NEXT: %copy:_(s32) = COPY $w0
308 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT %copy(s32)
309 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
310 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[ANYEXT]], [[C]]
311 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[AND]](s64)
312 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
313 ; CHECK-NEXT: [[UADDLV:%[0-9]+]]:_(<4 x s32>) = G_UADDLV [[CTPOP]]
314 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
315 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[UADDLV]](<4 x s32>), [[C1]](s64)
316 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[EVEC]](s32)
317 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
318 ; CHECK-NEXT: $w0 = COPY [[COPY1]](s32)
319 ; CHECK-NEXT: RET_ReallyLR implicit $w0
321 ; CHECK-CSSC-LABEL: name: different_sizes
322 ; CHECK-CSSC: liveins: $w0
323 ; CHECK-CSSC-NEXT: {{ $}}
324 ; CHECK-CSSC-NEXT: %copy:_(s32) = COPY $w0
325 ; CHECK-CSSC-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
326 ; CHECK-CSSC-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %copy, [[C]]
327 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(s32) = G_CTPOP [[AND]](s32)
328 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[CTPOP]](s32)
329 ; CHECK-CSSC-NEXT: $w0 = COPY [[COPY]](s32)
330 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $w0
331 %copy:_(s32) = COPY $w0
332 %trunc:_(s8) = G_TRUNC %copy(s32)
333 %ctpop:_(s16) = G_CTPOP %trunc(s8)
334 %ext:_(s32) = G_ANYEXT %ctpop(s16)
336 RET_ReallyLR implicit $w0
341 tracksRegLiveness: true
346 ; CHECK-LABEL: name: custom_8x16
347 ; CHECK: liveins: $q0
349 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
350 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<16 x s8>) = G_BITCAST [[COPY]](<8 x s16>)
351 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<16 x s8>) = G_CTPOP [[BITCAST]](<16 x s8>)
352 ; CHECK-NEXT: [[UADDLP:%[0-9]+]]:_(<8 x s16>) = G_UADDLP [[CTPOP]]
353 ; CHECK-NEXT: $q0 = COPY [[UADDLP]](<8 x s16>)
354 ; CHECK-NEXT: RET_ReallyLR implicit $q0
356 ; CHECK-CSSC-LABEL: name: custom_8x16
357 ; CHECK-CSSC: liveins: $q0
358 ; CHECK-CSSC-NEXT: {{ $}}
359 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
360 ; CHECK-CSSC-NEXT: [[BITCAST:%[0-9]+]]:_(<16 x s8>) = G_BITCAST [[COPY]](<8 x s16>)
361 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(<16 x s8>) = G_CTPOP [[BITCAST]](<16 x s8>)
362 ; CHECK-CSSC-NEXT: [[UADDLP:%[0-9]+]]:_(<8 x s16>) = G_UADDLP [[CTPOP]]
363 ; CHECK-CSSC-NEXT: $q0 = COPY [[UADDLP]](<8 x s16>)
364 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $q0
365 %0:_(<8 x s16>) = COPY $q0
366 %1:_(<8 x s16>) = G_CTPOP %0(<8 x s16>)
367 $q0 = COPY %1(<8 x s16>)
368 RET_ReallyLR implicit $q0
373 tracksRegLiveness: true
378 ; CHECK-LABEL: name: custom_4x32
379 ; CHECK: liveins: $q0
381 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
382 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<16 x s8>) = G_BITCAST [[COPY]](<4 x s32>)
383 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<16 x s8>) = G_CTPOP [[BITCAST]](<16 x s8>)
384 ; CHECK-NEXT: [[UADDLP:%[0-9]+]]:_(<8 x s16>) = G_UADDLP [[CTPOP]]
385 ; CHECK-NEXT: [[UADDLP1:%[0-9]+]]:_(<4 x s32>) = G_UADDLP [[UADDLP]]
386 ; CHECK-NEXT: $q0 = COPY [[UADDLP1]](<4 x s32>)
387 ; CHECK-NEXT: RET_ReallyLR implicit $q0
389 ; CHECK-CSSC-LABEL: name: custom_4x32
390 ; CHECK-CSSC: liveins: $q0
391 ; CHECK-CSSC-NEXT: {{ $}}
392 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
393 ; CHECK-CSSC-NEXT: [[BITCAST:%[0-9]+]]:_(<16 x s8>) = G_BITCAST [[COPY]](<4 x s32>)
394 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(<16 x s8>) = G_CTPOP [[BITCAST]](<16 x s8>)
395 ; CHECK-CSSC-NEXT: [[UADDLP:%[0-9]+]]:_(<8 x s16>) = G_UADDLP [[CTPOP]]
396 ; CHECK-CSSC-NEXT: [[UADDLP1:%[0-9]+]]:_(<4 x s32>) = G_UADDLP [[UADDLP]]
397 ; CHECK-CSSC-NEXT: $q0 = COPY [[UADDLP1]](<4 x s32>)
398 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $q0
399 %0:_(<4 x s32>) = COPY $q0
400 %1:_(<4 x s32>) = G_CTPOP %0(<4 x s32>)
401 $q0 = COPY %1(<4 x s32>)
402 RET_ReallyLR implicit $q0
407 tracksRegLiveness: true
412 ; CHECK-LABEL: name: custom_2x64
413 ; CHECK: liveins: $q0
415 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
416 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<16 x s8>) = G_BITCAST [[COPY]](<2 x s64>)
417 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<16 x s8>) = G_CTPOP [[BITCAST]](<16 x s8>)
418 ; CHECK-NEXT: [[UADDLP:%[0-9]+]]:_(<8 x s16>) = G_UADDLP [[CTPOP]]
419 ; CHECK-NEXT: [[UADDLP1:%[0-9]+]]:_(<4 x s32>) = G_UADDLP [[UADDLP]]
420 ; CHECK-NEXT: [[UADDLP2:%[0-9]+]]:_(<2 x s64>) = G_UADDLP [[UADDLP1]]
421 ; CHECK-NEXT: $q0 = COPY [[UADDLP2]](<2 x s64>)
422 ; CHECK-NEXT: RET_ReallyLR implicit $q0
424 ; CHECK-CSSC-LABEL: name: custom_2x64
425 ; CHECK-CSSC: liveins: $q0
426 ; CHECK-CSSC-NEXT: {{ $}}
427 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
428 ; CHECK-CSSC-NEXT: [[BITCAST:%[0-9]+]]:_(<16 x s8>) = G_BITCAST [[COPY]](<2 x s64>)
429 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(<16 x s8>) = G_CTPOP [[BITCAST]](<16 x s8>)
430 ; CHECK-CSSC-NEXT: [[UADDLP:%[0-9]+]]:_(<8 x s16>) = G_UADDLP [[CTPOP]]
431 ; CHECK-CSSC-NEXT: [[UADDLP1:%[0-9]+]]:_(<4 x s32>) = G_UADDLP [[UADDLP]]
432 ; CHECK-CSSC-NEXT: [[UADDLP2:%[0-9]+]]:_(<2 x s64>) = G_UADDLP [[UADDLP1]]
433 ; CHECK-CSSC-NEXT: $q0 = COPY [[UADDLP2]](<2 x s64>)
434 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $q0
435 %0:_(<2 x s64>) = COPY $q0
436 %1:_(<2 x s64>) = G_CTPOP %0(<2 x s64>)
437 $q0 = COPY %1(<2 x s64>)
438 RET_ReallyLR implicit $q0
443 tracksRegLiveness: true
448 ; CHECK-LABEL: name: custom_4x16
449 ; CHECK: liveins: $d0
451 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
452 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[COPY]](<4 x s16>)
453 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
454 ; CHECK-NEXT: [[UADDLP:%[0-9]+]]:_(<4 x s16>) = G_UADDLP [[CTPOP]]
455 ; CHECK-NEXT: $d0 = COPY [[UADDLP]](<4 x s16>)
456 ; CHECK-NEXT: RET_ReallyLR implicit $d0
458 ; CHECK-CSSC-LABEL: name: custom_4x16
459 ; CHECK-CSSC: liveins: $d0
460 ; CHECK-CSSC-NEXT: {{ $}}
461 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
462 ; CHECK-CSSC-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[COPY]](<4 x s16>)
463 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
464 ; CHECK-CSSC-NEXT: [[UADDLP:%[0-9]+]]:_(<4 x s16>) = G_UADDLP [[CTPOP]]
465 ; CHECK-CSSC-NEXT: $d0 = COPY [[UADDLP]](<4 x s16>)
466 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $d0
467 %0:_(<4 x s16>) = COPY $d0
468 %1:_(<4 x s16>) = G_CTPOP %0(<4 x s16>)
469 $d0 = COPY %1(<4 x s16>)
470 RET_ReallyLR implicit $d0
475 tracksRegLiveness: true
480 ; CHECK-LABEL: name: custom_2x32
481 ; CHECK: liveins: $d0
483 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
484 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[COPY]](<2 x s32>)
485 ; CHECK-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
486 ; CHECK-NEXT: [[UADDLP:%[0-9]+]]:_(<4 x s16>) = G_UADDLP [[CTPOP]]
487 ; CHECK-NEXT: [[UADDLP1:%[0-9]+]]:_(<2 x s32>) = G_UADDLP [[UADDLP]]
488 ; CHECK-NEXT: $d0 = COPY [[UADDLP1]](<2 x s32>)
489 ; CHECK-NEXT: RET_ReallyLR implicit $d0
491 ; CHECK-CSSC-LABEL: name: custom_2x32
492 ; CHECK-CSSC: liveins: $d0
493 ; CHECK-CSSC-NEXT: {{ $}}
494 ; CHECK-CSSC-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
495 ; CHECK-CSSC-NEXT: [[BITCAST:%[0-9]+]]:_(<8 x s8>) = G_BITCAST [[COPY]](<2 x s32>)
496 ; CHECK-CSSC-NEXT: [[CTPOP:%[0-9]+]]:_(<8 x s8>) = G_CTPOP [[BITCAST]](<8 x s8>)
497 ; CHECK-CSSC-NEXT: [[UADDLP:%[0-9]+]]:_(<4 x s16>) = G_UADDLP [[CTPOP]]
498 ; CHECK-CSSC-NEXT: [[UADDLP1:%[0-9]+]]:_(<2 x s32>) = G_UADDLP [[UADDLP]]
499 ; CHECK-CSSC-NEXT: $d0 = COPY [[UADDLP1]](<2 x s32>)
500 ; CHECK-CSSC-NEXT: RET_ReallyLR implicit $d0
501 %0:_(<2 x s32>) = COPY $d0
502 %1:_(<2 x s32>) = G_CTPOP %0(<2 x s32>)
503 $d0 = COPY %1(<2 x s32>)
504 RET_ReallyLR implicit $d0