1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -O0 -mtriple=arm64-unknown-unknown -global-isel -run-pass=legalizer -global-isel-abort=1 %s -o - | FileCheck %s
7 tracksRegLiveness: true
10 liveins: $w0, $w1, $w2
12 ; CHECK-LABEL: name: fshr_i8
13 ; CHECK: liveins: $w0, $w1, $w2
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
16 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
17 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
18 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 7
19 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
20 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
21 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY2]], [[C1]]
22 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C]](s32)
23 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[XOR]], [[COPY3]]
24 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
25 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C2]](s64)
26 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[SHL]], [[AND1]](s32)
27 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
28 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C3]]
29 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[AND]](s32)
30 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[LSHR]]
31 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
32 ; CHECK-NEXT: RET_ReallyLR implicit $w0
34 %0:_(s8) = G_TRUNC %3(s32)
36 %1:_(s8) = G_TRUNC %4(s32)
38 %2:_(s8) = G_TRUNC %5(s32)
39 %6:_(s8) = G_FSHR %0, %1, %2(s8)
40 %7:_(s32) = G_ANYEXT %6(s8)
42 RET_ReallyLR implicit $w0
49 tracksRegLiveness: true
52 liveins: $w0, $w1, $w2
54 ; CHECK-LABEL: name: fshr_i16
55 ; CHECK: liveins: $w0, $w1, $w2
57 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
58 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
59 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
60 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
61 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
62 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
63 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY2]], [[C1]]
64 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C]](s32)
65 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[XOR]], [[COPY3]]
66 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
67 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C2]](s64)
68 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[SHL]], [[AND1]](s32)
69 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
70 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C3]]
71 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[AND]](s32)
72 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[LSHR]]
73 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
74 ; CHECK-NEXT: RET_ReallyLR implicit $w0
76 %0:_(s16) = G_TRUNC %3(s32)
78 %1:_(s16) = G_TRUNC %4(s32)
80 %2:_(s16) = G_TRUNC %5(s32)
81 %6:_(s16) = G_FSHR %0, %1, %2(s16)
82 %7:_(s32) = G_ANYEXT %6(s16)
84 RET_ReallyLR implicit $w0
91 tracksRegLiveness: true
94 liveins: $w0, $w1, $w2
96 ; CHECK-LABEL: name: fshr_i32
97 ; CHECK: liveins: $w0, $w1, $w2
99 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
100 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
101 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
102 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 31
103 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
104 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
105 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY2]], [[C1]]
106 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[XOR]], [[C]]
107 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
108 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C2]](s64)
109 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[SHL]], [[AND1]](s32)
110 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[AND]](s32)
111 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[LSHR]]
112 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
113 ; CHECK-NEXT: RET_ReallyLR implicit $w0
117 %3:_(s32) = G_FSHR %0, %1, %2(s32)
119 RET_ReallyLR implicit $w0
126 tracksRegLiveness: true
129 liveins: $x0, $x1, $x2
131 ; CHECK-LABEL: name: fshr_i64
132 ; CHECK: liveins: $x0, $x1, $x2
134 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
135 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
136 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
137 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 63
138 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[C]]
139 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
140 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[COPY2]], [[C1]]
141 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[XOR]], [[C]]
142 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
143 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C2]](s64)
144 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[SHL]], [[AND1]](s64)
145 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY1]], [[AND]](s64)
146 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL1]], [[LSHR]]
147 ; CHECK-NEXT: $x0 = COPY [[OR]](s64)
148 ; CHECK-NEXT: RET_ReallyLR implicit $x0
152 %3:_(s64) = G_FSHR %0, %1, %2(s64)
154 RET_ReallyLR implicit $x0
160 name: fshr_i8_const_shift
162 tracksRegLiveness: true
167 ; CHECK-LABEL: name: fshr_i8_const_shift
168 ; CHECK: liveins: $w0, $w1
170 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
171 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
172 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
173 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
174 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
175 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
176 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
177 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C2]](s64)
178 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR]]
179 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
180 ; CHECK-NEXT: RET_ReallyLR implicit $w0
182 %0:_(s8) = G_TRUNC %2(s32)
184 %1:_(s8) = G_TRUNC %3(s32)
185 %7:_(s8) = G_CONSTANT i8 7
186 %5:_(s8) = G_FSHR %0, %1, %7(s8)
187 %6:_(s32) = G_ANYEXT %5(s8)
189 RET_ReallyLR implicit $w0
194 name: fshr_i8_const_overshift
196 tracksRegLiveness: true
201 ; CHECK-LABEL: name: fshr_i8_const_overshift
202 ; CHECK: liveins: $w0, $w1
204 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
205 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
206 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
207 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
208 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
209 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
210 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
211 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C2]](s64)
212 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR]]
213 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
214 ; CHECK-NEXT: RET_ReallyLR implicit $w0
216 %0:_(s8) = G_TRUNC %2(s32)
218 %1:_(s8) = G_TRUNC %3(s32)
219 %7:_(s8) = G_CONSTANT i8 10
220 %5:_(s8) = G_FSHR %0, %1, %7(s8)
221 %6:_(s32) = G_ANYEXT %5(s8)
223 RET_ReallyLR implicit $w0
228 name: fshr_i8_shift_by_bandwidth
230 tracksRegLiveness: true
235 ; CHECK-LABEL: name: fshr_i8_shift_by_bandwidth
236 ; CHECK: liveins: $w0, $w1
238 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
239 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
240 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
241 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
242 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
243 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[SHL]], [[C1]](s64)
244 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
245 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
246 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
247 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C3]](s64)
248 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[LSHR]]
249 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
250 ; CHECK-NEXT: RET_ReallyLR implicit $w0
252 %0:_(s8) = G_TRUNC %2(s32)
254 %1:_(s8) = G_TRUNC %3(s32)
255 %7:_(s8) = G_CONSTANT i8 8
256 %5:_(s8) = G_FSHR %0, %1, %7(s8)
257 %6:_(s32) = G_ANYEXT %5(s8)
259 RET_ReallyLR implicit $w0
264 name: fshr_i16_const_shift
266 tracksRegLiveness: true
271 ; CHECK-LABEL: name: fshr_i16_const_shift
272 ; CHECK: liveins: $w0, $w1
274 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
275 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
276 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 11
277 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
278 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
279 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
280 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
281 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C2]](s64)
282 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR]]
283 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
284 ; CHECK-NEXT: RET_ReallyLR implicit $w0
286 %0:_(s16) = G_TRUNC %2(s32)
288 %1:_(s16) = G_TRUNC %3(s32)
289 %4:_(s16) = G_CONSTANT i16 5
290 %5:_(s16) = G_FSHR %0, %1, %4(s16)
291 %6:_(s32) = G_ANYEXT %5(s16)
293 RET_ReallyLR implicit $w0
298 name: fshr_i16_const_overshift
300 tracksRegLiveness: true
305 ; CHECK-LABEL: name: fshr_i16_const_overshift
306 ; CHECK: liveins: $w0, $w1
308 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
309 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
310 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
311 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
312 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
313 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
314 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
315 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C2]](s64)
316 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR]]
317 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
318 ; CHECK-NEXT: RET_ReallyLR implicit $w0
320 %0:_(s16) = G_TRUNC %2(s32)
322 %1:_(s16) = G_TRUNC %3(s32)
323 %4:_(s16) = G_CONSTANT i16 20
324 %5:_(s16) = G_FSHR %0, %1, %4(s16)
325 %6:_(s32) = G_ANYEXT %5(s16)
327 RET_ReallyLR implicit $w0
332 name: fshr_i16_shift_by_bandwidth
334 tracksRegLiveness: true
339 ; CHECK-LABEL: name: fshr_i16_shift_by_bandwidth
340 ; CHECK: liveins: $w0, $w1
342 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
343 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
344 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
345 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
346 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 15
347 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[SHL]], [[C1]](s64)
348 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
349 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
350 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
351 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C3]](s64)
352 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[LSHR]]
353 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
354 ; CHECK-NEXT: RET_ReallyLR implicit $w0
356 %0:_(s16) = G_TRUNC %2(s32)
358 %1:_(s16) = G_TRUNC %3(s32)
359 %4:_(s16) = G_CONSTANT i16 16
360 %5:_(s16) = G_FSHR %0, %1, %4(s16)
361 %6:_(s32) = G_ANYEXT %5(s16)
363 RET_ReallyLR implicit $w0
368 name: fshr_i32_const_shift
370 tracksRegLiveness: true
375 ; CHECK-LABEL: name: fshr_i32_const_shift
376 ; CHECK: liveins: $w0, $w1
378 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
379 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
380 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 9
381 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s32) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)
382 ; CHECK-NEXT: $w0 = COPY [[FSHR]](s32)
383 ; CHECK-NEXT: RET_ReallyLR implicit $w0
386 %2:_(s32) = G_CONSTANT i32 9
387 %3:_(s32) = G_FSHR %0, %1, %2(s32)
389 RET_ReallyLR implicit $w0
394 name: fshr_i32_const_overshift
396 tracksRegLiveness: true
401 ; CHECK-LABEL: name: fshr_i32_const_overshift
402 ; CHECK: liveins: $w0, $w1
404 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
405 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
406 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 10
407 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s32) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)
408 ; CHECK-NEXT: $w0 = COPY [[FSHR]](s32)
409 ; CHECK-NEXT: RET_ReallyLR implicit $w0
412 %4:_(s32) = G_CONSTANT i32 42
413 %3:_(s32) = G_FSHR %0, %1, %4(s32)
415 RET_ReallyLR implicit $w0
420 name: fshr_i32_shift_by_bitwidth
422 tracksRegLiveness: true
427 ; CHECK-LABEL: name: fshr_i32_shift_by_bitwidth
428 ; CHECK: liveins: $w0, $w1
430 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w1
431 ; CHECK-NEXT: $w0 = COPY [[COPY]](s32)
432 ; CHECK-NEXT: RET_ReallyLR implicit $w0
435 RET_ReallyLR implicit $w0
440 name: fshr_i64_const_shift
442 tracksRegLiveness: true
447 ; CHECK-LABEL: name: fshr_i64_const_shift
448 ; CHECK: liveins: $x0, $x1
450 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
451 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
452 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 41
453 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s64) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)
454 ; CHECK-NEXT: $x0 = COPY [[FSHR]](s64)
455 ; CHECK-NEXT: RET_ReallyLR implicit $x0
458 %4:_(s64) = G_CONSTANT i64 41
459 %3:_(s64) = G_FSHR %0, %1, %4(s64)
461 RET_ReallyLR implicit $x0
466 name: fshr_i64_const_overshift
468 tracksRegLiveness: true
473 ; CHECK-LABEL: name: fshr_i64_const_overshift
474 ; CHECK: liveins: $x0, $x1
476 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
477 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
478 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
479 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s64) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)
480 ; CHECK-NEXT: $x0 = COPY [[FSHR]](s64)
481 ; CHECK-NEXT: RET_ReallyLR implicit $x0
484 %4:_(s64) = G_CONSTANT i64 72
485 %3:_(s64) = G_FSHR %0, %1, %4(s64)
487 RET_ReallyLR implicit $x0
492 name: fshr_i64_shift_by_bandwidth
494 tracksRegLiveness: true
499 ; CHECK-LABEL: name: fshr_i64_shift_by_bandwidth
500 ; CHECK: liveins: $x0, $x1
502 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
503 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
504 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 63
505 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
506 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
507 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C2]](s64)
508 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[SHL]], [[C]](s64)
509 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY1]], [[C1]](s64)
510 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL1]], [[LSHR]]
511 ; CHECK-NEXT: $x0 = COPY [[OR]](s64)
512 ; CHECK-NEXT: RET_ReallyLR implicit $x0
515 %4:_(s64) = G_CONSTANT i64 64
516 %3:_(s64) = G_FSHR %0, %1, %4(s64)
518 RET_ReallyLR implicit $x0
523 name: fshr_v4i32_shift_by_bitwidth
525 tracksRegLiveness: true
530 ; CHECK-LABEL: name: fshr_v4i32_shift_by_bitwidth
531 ; CHECK: liveins: $q0, $q1
533 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
534 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $q1
535 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 31
536 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
537 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C1]](s32), [[C1]](s32), [[C1]](s32), [[C1]](s32)
538 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
539 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
540 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C2]](s32), [[C2]](s32), [[C2]](s32), [[C2]](s32)
541 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(<4 x s32>) = G_SHL [[COPY]], [[BUILD_VECTOR2]](<4 x s32>)
542 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(<4 x s32>) = G_SHL [[SHL]], [[BUILD_VECTOR1]](<4 x s32>)
543 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(<4 x s32>) = G_LSHR [[COPY1]], [[BUILD_VECTOR]](<4 x s32>)
544 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<4 x s32>) = G_OR [[SHL1]], [[LSHR]]
545 ; CHECK-NEXT: $q0 = COPY [[OR]](<4 x s32>)
546 ; CHECK-NEXT: RET_ReallyLR implicit $q0
547 %0:_(<4 x s32>) = COPY $q0
548 %1:_(<4 x s32>) = COPY $q1
549 %3:_(s32) = G_CONSTANT i32 32
550 %2:_(<4 x s32>) = G_BUILD_VECTOR %3(s32), %3(s32), %3(s32), %3(s32)
551 %4:_(<4 x s32>) = G_FSHR %0, %1, %2(<4 x s32>)
552 $q0 = COPY %4(<4 x s32>)
553 RET_ReallyLR implicit $q0