1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
6 tracksRegLiveness: true
13 ; CHECK-LABEL: name: shl_by_ge_bw
16 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
17 ; CHECK-NEXT: $w0 = COPY [[DEF]](s32)
18 ; CHECK-NEXT: RET_ReallyLR implicit $w0
20 %0:_(s16) = G_TRUNC %1(s32)
21 %2:_(s16) = G_CONSTANT i16 20
22 %3:_(s16) = G_SHL %0, %2(s16)
23 %4:_(s32) = G_ANYEXT %3(s16)
25 RET_ReallyLR implicit $w0
31 tracksRegLiveness: true
38 ; CHECK-LABEL: name: lshr_by_ge_bw
41 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
42 ; CHECK-NEXT: $w0 = COPY [[DEF]](s32)
43 ; CHECK-NEXT: RET_ReallyLR implicit $w0
45 %0:_(s16) = G_TRUNC %1(s32)
46 %2:_(s16) = G_CONSTANT i16 16
47 %3:_(s16) = G_LSHR %0, %2(s16)
48 %4:_(s32) = G_ANYEXT %3(s16)
50 RET_ReallyLR implicit $w0
56 tracksRegLiveness: true
63 ; CHECK-LABEL: name: ashr_by_ge_bw
66 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
67 ; CHECK-NEXT: $w0 = COPY [[DEF]](s32)
68 ; CHECK-NEXT: RET_ReallyLR implicit $w0
70 %0:_(s16) = G_TRUNC %1(s32)
71 %2:_(s16) = G_CONSTANT i16 20
72 %3:_(s16) = G_ASHR %0, %2(s16)
73 %4:_(s32) = G_ANYEXT %3(s16)
75 RET_ReallyLR implicit $w0
79 name: shl_by_ge_bw_vector
81 tracksRegLiveness: true
88 ; CHECK-LABEL: name: shl_by_ge_bw_vector
91 ; CHECK-NEXT: %shl:_(<4 x s32>) = G_IMPLICIT_DEF
92 ; CHECK-NEXT: $q0 = COPY %shl(<4 x s32>)
93 ; CHECK-NEXT: RET_ReallyLR implicit $q0
94 %1:_(<4 x s32>) = COPY $q0
95 %0:_(s32) = G_CONSTANT i32 32
96 %bv:_(<4 x s32>) = G_BUILD_VECTOR %0, %0, %0, %0
97 %shl:_(<4 x s32>) = G_SHL %1, %bv(<4 x s32>)
98 $q0 = COPY %shl(<4 x s32>)
99 RET_ReallyLR implicit $q0
103 name: shl_by_ge_bw_vector_partial
105 tracksRegLiveness: true
112 ; CHECK-LABEL: name: shl_by_ge_bw_vector_partial
113 ; CHECK: liveins: $q0
115 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
116 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 32
117 ; CHECK-NEXT: %small:_(s32) = G_CONSTANT i32 4
118 ; CHECK-NEXT: %bv:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), %small(s32)
119 ; CHECK-NEXT: %shl:_(<4 x s32>) = G_SHL [[COPY]], %bv(<4 x s32>)
120 ; CHECK-NEXT: $q0 = COPY %shl(<4 x s32>)
121 ; CHECK-NEXT: RET_ReallyLR implicit $q0
122 %1:_(<4 x s32>) = COPY $q0
123 %0:_(s32) = G_CONSTANT i32 32
124 %small:_(s32) = G_CONSTANT i32 4
125 %bv:_(<4 x s32>) = G_BUILD_VECTOR %0, %0, %0, %small
126 %shl:_(<4 x s32>) = G_SHL %1, %bv(<4 x s32>)
127 $q0 = COPY %shl(<4 x s32>)
128 RET_ReallyLR implicit $q0