1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64-unknown-unknown -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s
6 tracksRegLiveness: true
11 ; CHECK-LABEL: name: shl_cimm_32
13 ; CHECK: [[COPY:%[0-9]+]]:gpr(s32) = COPY $w0
14 ; CHECK: [[C:%[0-9]+]]:gpr(s32) = G_CONSTANT i32 8
15 ; CHECK: [[SHL:%[0-9]+]]:gpr(s32) = G_SHL [[COPY]], [[C]](s32)
16 ; CHECK: $w0 = COPY [[SHL]](s32)
17 ; CHECK: RET_ReallyLR implicit $w0
19 %1:_(s32) = G_CONSTANT i32 8
20 %2:_(s32) = G_SHL %0, %1(s32)
22 RET_ReallyLR implicit $w0
28 tracksRegLiveness: true
33 ; CHECK-LABEL: name: shl_cimm_64
35 ; CHECK: [[COPY:%[0-9]+]]:gpr(s64) = COPY $x0
36 ; CHECK: [[C:%[0-9]+]]:gpr(s64) = G_CONSTANT i64 8
37 ; CHECK: [[SHL:%[0-9]+]]:gpr(s64) = G_SHL [[COPY]], [[C]](s64)
38 ; CHECK: $x0 = COPY [[SHL]](s64)
39 ; CHECK: RET_ReallyLR implicit $x0
41 %1:_(s64) = G_CONSTANT i64 8
42 %2:_(s64) = G_SHL %0, %1(s64)
44 RET_ReallyLR implicit $x0
50 tracksRegLiveness: true
55 ; CHECK-LABEL: name: lshr_cimm_32
57 ; CHECK: [[COPY:%[0-9]+]]:gpr(s32) = COPY $w0
58 ; CHECK: [[C:%[0-9]+]]:gpr(s64) = G_CONSTANT i64 8
59 ; CHECK: [[LSHR:%[0-9]+]]:gpr(s32) = G_LSHR [[COPY]], [[C]](s64)
60 ; CHECK: $w0 = COPY [[LSHR]](s32)
61 ; CHECK: RET_ReallyLR implicit $w0
63 %3:_(s64) = G_CONSTANT i64 8
64 %2:_(s32) = G_LSHR %0, %3(s64)
66 RET_ReallyLR implicit $w0
72 tracksRegLiveness: true
77 ; CHECK-LABEL: name: lshr_cimm_64
79 ; CHECK: [[COPY:%[0-9]+]]:gpr(s64) = COPY $x0
80 ; CHECK: [[C:%[0-9]+]]:gpr(s64) = G_CONSTANT i64 8
81 ; CHECK: [[LSHR:%[0-9]+]]:gpr(s64) = G_LSHR [[COPY]], [[C]](s64)
82 ; CHECK: $x0 = COPY [[LSHR]](s64)
83 ; CHECK: RET_ReallyLR implicit $x0
85 %1:_(s64) = G_CONSTANT i64 8
86 %2:_(s64) = G_LSHR %0, %1(s64)
88 RET_ReallyLR implicit $x0
94 tracksRegLiveness: true
99 ; CHECK-LABEL: name: ashr_cimm_32
100 ; CHECK: liveins: $w0
101 ; CHECK: [[COPY:%[0-9]+]]:gpr(s32) = COPY $w0
102 ; CHECK: [[C:%[0-9]+]]:gpr(s64) = G_CONSTANT i64 8
103 ; CHECK: [[ASHR:%[0-9]+]]:gpr(s32) = G_ASHR [[COPY]], [[C]](s64)
104 ; CHECK: $w0 = COPY [[ASHR]](s32)
105 ; CHECK: RET_ReallyLR implicit $w0
107 %3:_(s64) = G_CONSTANT i64 8
108 %2:_(s32) = G_ASHR %0, %3(s64)
110 RET_ReallyLR implicit $w0
116 tracksRegLiveness: true
121 ; CHECK-LABEL: name: ashr_cimm_64
122 ; CHECK: liveins: $x0
123 ; CHECK: [[COPY:%[0-9]+]]:gpr(s64) = COPY $x0
124 ; CHECK: [[C:%[0-9]+]]:gpr(s64) = G_CONSTANT i64 8
125 ; CHECK: [[ASHR:%[0-9]+]]:gpr(s64) = G_ASHR [[COPY]], [[C]](s64)
126 ; CHECK: $x0 = COPY [[ASHR]](s64)
127 ; CHECK: RET_ReallyLR implicit $x0
129 %1:_(s64) = G_CONSTANT i64 8
130 %2:_(s64) = G_ASHR %0, %1(s64)
132 RET_ReallyLR implicit $x0