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: fshl_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: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[AND]](s32)
25 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
26 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
27 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
28 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[C3]](s64)
29 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
30 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[AND1]](s32)
31 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR1]]
32 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
33 ; CHECK-NEXT: RET_ReallyLR implicit $w0
35 %0:_(s8) = G_TRUNC %3(s32)
37 %1:_(s8) = G_TRUNC %4(s32)
39 %2:_(s8) = G_TRUNC %5(s32)
40 %6:_(s8) = G_FSHL %0, %1, %2(s8)
41 %7:_(s32) = G_ANYEXT %6(s8)
43 RET_ReallyLR implicit $w0
50 tracksRegLiveness: true
53 liveins: $w0, $w1, $w2
55 ; CHECK-LABEL: name: fshl_i16
56 ; CHECK: liveins: $w0, $w1, $w2
58 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
59 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
60 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
61 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
62 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
63 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
64 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY2]], [[C1]]
65 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C]](s32)
66 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[XOR]], [[COPY3]]
67 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[AND]](s32)
68 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
69 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
70 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
71 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[C3]](s64)
72 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
73 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[AND1]](s32)
74 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR1]]
75 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
76 ; CHECK-NEXT: RET_ReallyLR implicit $w0
78 %0:_(s16) = G_TRUNC %3(s32)
80 %1:_(s16) = G_TRUNC %4(s32)
82 %2:_(s16) = G_TRUNC %5(s32)
83 %6:_(s16) = G_FSHL %0, %1, %2(s16)
84 %7:_(s32) = G_ANYEXT %6(s16)
86 RET_ReallyLR implicit $w0
93 tracksRegLiveness: true
96 liveins: $w0, $w1, $w2
98 ; CHECK-LABEL: name: fshl_i32
99 ; CHECK: liveins: $w0, $w1, $w2
101 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
102 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
103 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
104 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 31
105 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
106 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
107 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY2]], [[C1]]
108 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[XOR]], [[C]]
109 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[AND]](s32)
110 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
111 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C2]](s64)
112 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[LSHR]], [[AND1]](s32)
113 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR1]]
114 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
115 ; CHECK-NEXT: RET_ReallyLR implicit $w0
119 %3:_(s32) = G_FSHL %0, %1, %2(s32)
121 RET_ReallyLR implicit $w0
128 tracksRegLiveness: true
131 liveins: $x0, $x1, $x2
133 ; CHECK-LABEL: name: fshl_i64
134 ; CHECK: liveins: $x0, $x1, $x2
136 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
137 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
138 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
139 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 63
140 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[C]]
141 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
142 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[COPY2]], [[C1]]
143 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[XOR]], [[C]]
144 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
145 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[AND]](s64)
146 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY1]], [[C2]](s64)
147 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s64) = G_LSHR [[LSHR]], [[AND1]](s64)
148 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL]], [[LSHR1]]
149 ; CHECK-NEXT: $x0 = COPY [[OR]](s64)
150 ; CHECK-NEXT: RET_ReallyLR implicit $x0
154 %3:_(s64) = G_FSHL %0, %1, %2(s64)
156 RET_ReallyLR implicit $x0
161 name: fshl_i8_const_shift
163 tracksRegLiveness: true
168 ; CHECK-LABEL: name: fshl_i8_const_shift
169 ; CHECK: liveins: $w0, $w1
171 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
172 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
173 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
174 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
175 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
176 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
177 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C]](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 4
186 %5:_(s8) = G_FSHL %0, %1, %7(s8)
187 %6:_(s32) = G_ANYEXT %5(s8)
189 RET_ReallyLR implicit $w0
194 name: fshl_i8_const_overshift
196 tracksRegLiveness: true
201 ; CHECK-LABEL: name: fshl_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 2
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 6
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_FSHL %0, %1, %7(s8)
221 %6:_(s32) = G_ANYEXT %5(s8)
223 RET_ReallyLR implicit $w0
228 name: fshl_i8_shift_by_bitwidth
230 tracksRegLiveness: true
235 ; CHECK-LABEL: name: fshl_i8_shift_by_bitwidth
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 0
241 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
242 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
243 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
244 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
245 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C2]](s64)
246 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
247 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
248 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[C3]](s64)
249 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR1]]
250 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
251 ; CHECK-NEXT: RET_ReallyLR implicit $w0
253 %0:_(s8) = G_TRUNC %2(s32)
255 %1:_(s8) = G_TRUNC %3(s32)
256 %7:_(s8) = G_CONSTANT i8 8
257 %5:_(s8) = G_FSHL %0, %1, %7(s8)
258 %6:_(s32) = G_ANYEXT %5(s8)
260 RET_ReallyLR implicit $w0
265 name: fshl_i16_const_shift
267 tracksRegLiveness: true
272 ; CHECK-LABEL: name: fshl_i16_const_shift
273 ; CHECK: liveins: $w0, $w1
275 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
276 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
277 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
278 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
279 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
280 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
281 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
282 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C2]](s64)
283 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR]]
284 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
285 ; CHECK-NEXT: RET_ReallyLR implicit $w0
287 %0:_(s16) = G_TRUNC %2(s32)
289 %1:_(s16) = G_TRUNC %3(s32)
290 %4:_(s16) = G_CONSTANT i16 12
291 %5:_(s16) = G_FSHL %0, %1, %4(s16)
292 %6:_(s32) = G_ANYEXT %5(s16)
294 RET_ReallyLR implicit $w0
299 name: fshl_i16_const_overshift
301 tracksRegLiveness: true
306 ; CHECK-LABEL: name: fshl_i16_const_overshift
307 ; CHECK: liveins: $w0, $w1
309 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
310 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
311 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
312 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
313 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
314 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
315 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 12
316 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C2]](s64)
317 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR]]
318 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
319 ; CHECK-NEXT: RET_ReallyLR implicit $w0
321 %0:_(s16) = G_TRUNC %2(s32)
323 %1:_(s16) = G_TRUNC %3(s32)
324 %4:_(s16) = G_CONSTANT i16 20
325 %5:_(s16) = G_FSHL %0, %1, %4(s16)
326 %6:_(s32) = G_ANYEXT %5(s16)
328 RET_ReallyLR implicit $w0
333 name: fshl_i16_shift_by_bitwidth
335 tracksRegLiveness: true
340 ; CHECK-LABEL: name: fshl_i16_shift_by_bitwidth
341 ; CHECK: liveins: $w0, $w1
343 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
344 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
345 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
346 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
347 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
348 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
349 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
350 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[C2]](s64)
351 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
352 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 15
353 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[C3]](s64)
354 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR1]]
355 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
356 ; CHECK-NEXT: RET_ReallyLR implicit $w0
358 %0:_(s16) = G_TRUNC %2(s32)
360 %1:_(s16) = G_TRUNC %3(s32)
361 %4:_(s16) = G_CONSTANT i16 16
362 %5:_(s16) = G_FSHL %0, %1, %4(s16)
363 %6:_(s32) = G_ANYEXT %5(s16)
365 RET_ReallyLR implicit $w0
370 name: fshl_i32_const_shift
372 tracksRegLiveness: true
377 ; CHECK-LABEL: name: fshl_i32_const_shift
378 ; CHECK: liveins: $w0, $w1
380 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
381 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
382 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 23
383 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s32) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)
384 ; CHECK-NEXT: $w0 = COPY [[FSHR]](s32)
385 ; CHECK-NEXT: RET_ReallyLR implicit $w0
388 %2:_(s32) = G_CONSTANT i32 9
389 %3:_(s32) = G_FSHL %0, %1, %2(s32)
391 RET_ReallyLR implicit $w0
396 name: fshl_i32_const_overshift
398 tracksRegLiveness: true
403 ; CHECK-LABEL: name: fshl_i32_const_overshift
404 ; CHECK: liveins: $w0, $w1
406 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
407 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
408 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 22
409 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s32) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)
410 ; CHECK-NEXT: $w0 = COPY [[FSHR]](s32)
411 ; CHECK-NEXT: RET_ReallyLR implicit $w0
414 %4:_(s32) = G_CONSTANT i32 42
415 %3:_(s32) = G_FSHL %0, %1, %4(s32)
417 RET_ReallyLR implicit $w0
422 name: fshl_i32_shift_by_bandwidth
424 tracksRegLiveness: true
429 ; CHECK-LABEL: name: fshl_i32_shift_by_bandwidth
430 ; CHECK: liveins: $w0, $w1
432 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
433 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
434 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
435 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s64)
436 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
437 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C1]](s64)
438 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 31
439 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[LSHR]], [[C2]](s64)
440 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[LSHR1]]
441 ; CHECK-NEXT: $w0 = COPY [[OR]](s32)
442 ; CHECK-NEXT: RET_ReallyLR implicit $w0
445 %4:_(s32) = G_CONSTANT i32 32
446 %3:_(s32) = G_FSHL %0, %1, %4(s32)
448 RET_ReallyLR implicit $w0
453 name: fshl_i64_const_shift
455 tracksRegLiveness: true
460 ; CHECK-LABEL: name: fshl_i64_const_shift
461 ; CHECK: liveins: $x0, $x1
463 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
464 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
465 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 23
466 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s64) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)
467 ; CHECK-NEXT: $x0 = COPY [[FSHR]](s64)
468 ; CHECK-NEXT: RET_ReallyLR implicit $x0
471 %4:_(s64) = G_CONSTANT i64 41
472 %3:_(s64) = G_FSHL %0, %1, %4(s64)
474 RET_ReallyLR implicit $x0
479 name: fshl_i64_const_overshift
481 tracksRegLiveness: true
486 ; CHECK-LABEL: name: fshl_i64_const_overshift
487 ; CHECK: liveins: $x0, $x1
489 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
490 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
491 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
492 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s64) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)
493 ; CHECK-NEXT: $x0 = COPY [[FSHR]](s64)
494 ; CHECK-NEXT: RET_ReallyLR implicit $x0
497 %4:_(s64) = G_CONSTANT i64 72
498 %3:_(s64) = G_FSHL %0, %1, %4(s64)
500 RET_ReallyLR implicit $x0
505 name: fshl_i64_shift_by_bandwidth
507 tracksRegLiveness: true
512 ; CHECK-LABEL: name: fshl_i64_shift_by_bandwidth
513 ; CHECK: liveins: $x0, $x1
515 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
516 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
517 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 63
518 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
519 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
520 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C1]](s64)
521 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY1]], [[C2]](s64)
522 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s64) = G_LSHR [[LSHR]], [[C]](s64)
523 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL]], [[LSHR1]]
524 ; CHECK-NEXT: $x0 = COPY [[OR]](s64)
525 ; CHECK-NEXT: RET_ReallyLR implicit $x0
528 %4:_(s64) = G_CONSTANT i64 64
529 %3:_(s64) = G_FSHL %0, %1, %4(s64)
531 RET_ReallyLR implicit $x0
538 name: fshl_v4i32_shift_by_bitwidth
540 tracksRegLiveness: true
545 ; CHECK-LABEL: name: fshl_v4i32_shift_by_bitwidth
546 ; CHECK: liveins: $q0, $q1
548 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
549 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $q1
550 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 31
551 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
552 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C1]](s32), [[C1]](s32), [[C1]](s32), [[C1]](s32)
553 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
554 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
555 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C2]](s32), [[C2]](s32), [[C2]](s32), [[C2]](s32)
556 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(<4 x s32>) = G_SHL [[COPY]], [[BUILD_VECTOR]](<4 x s32>)
557 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(<4 x s32>) = G_LSHR [[COPY1]], [[BUILD_VECTOR2]](<4 x s32>)
558 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(<4 x s32>) = G_LSHR [[LSHR]], [[BUILD_VECTOR1]](<4 x s32>)
559 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<4 x s32>) = G_OR [[SHL]], [[LSHR1]]
560 ; CHECK-NEXT: $q0 = COPY [[OR]](<4 x s32>)
561 ; CHECK-NEXT: RET_ReallyLR implicit $q0
562 %0:_(<4 x s32>) = COPY $q0
563 %1:_(<4 x s32>) = COPY $q1
564 %3:_(s32) = G_CONSTANT i32 32
565 %2:_(<4 x s32>) = G_BUILD_VECTOR %3(s32), %3(s32), %3(s32), %3(s32)
566 %4:_(<4 x s32>) = G_FSHL %0, %1, %2(<4 x s32>)
567 $q0 = COPY %4(<4 x s32>)
568 RET_ReallyLR implicit $q0