1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
7 tracksRegLiveness: true
10 machineFunctionInfo: {}
14 ; CHECK-LABEL: name: mul_by_zero
17 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
18 ; CHECK-NEXT: $x0 = COPY [[C]](s64)
20 %1:_(s64) = G_CONSTANT i64 0
21 %2:_(s64) = G_MUL %0, %1(s64)
25 name: mul_vector_by_zero
27 tracksRegLiveness: true
30 machineFunctionInfo: {}
34 ; CHECK-LABEL: name: mul_vector_by_zero
37 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
38 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
39 ; CHECK-NEXT: $q0 = COPY [[BUILD_VECTOR]](<4 x s32>)
40 %0:_(<4 x s32>) = COPY $q0
41 %1:_(s32) = G_CONSTANT i32 0
42 %2:_(<4 x s32>) = G_BUILD_VECTOR %1(s32), %1(s32), %1(s32), %1(s32)
43 %3:_(<4 x s32>) = G_MUL %0, %2(<4 x s32>)
44 $q0 = COPY %3(<4 x s32>)
49 tracksRegLiveness: true
52 machineFunctionInfo: {}
56 ; CHECK-LABEL: name: mul_by_one
59 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
60 ; CHECK-NEXT: $x0 = COPY [[COPY]](s64)
62 %1:_(s64) = G_CONSTANT i64 1
63 %2:_(s64) = G_MUL %0, %1(s64)
68 tracksRegLiveness: true
72 ; CHECK-LABEL: name: fmul_by_one
75 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $d0
76 ; CHECK-NEXT: $d0 = COPY [[COPY]](s64)
78 %1:_(s64) = G_FCONSTANT double 1.000000e+00
79 %2:_(s64) = G_FMUL %0, %1(s64)
83 name: fmul_vector_by_one
85 tracksRegLiveness: true
88 machineFunctionInfo: {}
92 ; CHECK-LABEL: name: fmul_vector_by_one
95 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
96 ; CHECK-NEXT: $q0 = COPY [[COPY]](<4 x s32>)
97 %0:_(<4 x s32>) = COPY $q0
98 %1:_(s32) = G_FCONSTANT float 1.0
99 %2:_(<4 x s32>) = G_BUILD_VECTOR %1(s32), %1(s32), %1(s32), %1(s32)
100 %3:_(<4 x s32>) = G_FMUL %0, %2(<4 x s32>)
101 $q0 = COPY %3(<4 x s32>)
104 name: mul_vector_by_one
106 tracksRegLiveness: true
109 machineFunctionInfo: {}
113 ; CHECK-LABEL: name: mul_vector_by_one
114 ; CHECK: liveins: $q0
116 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
117 ; CHECK-NEXT: $q0 = COPY [[COPY]](<4 x s32>)
118 %0:_(<4 x s32>) = COPY $q0
119 %1:_(s32) = G_CONSTANT i32 1
120 %2:_(<4 x s32>) = G_BUILD_VECTOR %1(s32), %1(s32), %1(s32), %1(s32)
121 %3:_(<4 x s32>) = G_MUL %0, %2(<4 x s32>)
122 $q0 = COPY %3(<4 x s32>)
127 tracksRegLiveness: true
130 machineFunctionInfo: {}
134 ; CHECK-LABEL: name: mul_by_neg_one
135 ; CHECK: liveins: $x0
137 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
138 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
139 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[C]], [[COPY]]
140 ; CHECK-NEXT: $x0 = COPY [[SUB]](s64)
142 %1:_(s64) = G_CONSTANT i64 -1
143 %2:_(s64) = G_MUL %0, %1(s64)
147 name: mul_vector_by_neg_one
149 tracksRegLiveness: true
152 machineFunctionInfo: {}
156 ; CHECK-LABEL: name: mul_vector_by_neg_one
157 ; CHECK: liveins: $q0
159 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
160 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
161 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
162 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(<4 x s32>) = G_SUB [[BUILD_VECTOR]], [[COPY]]
163 ; CHECK-NEXT: $q0 = COPY [[SUB]](<4 x s32>)
164 %0:_(<4 x s32>) = COPY $q0
165 %1:_(s32) = G_CONSTANT i32 -1
166 %2:_(<4 x s32>) = G_BUILD_VECTOR %1(s32), %1(s32), %1(s32), %1(s32)
167 %3:_(<4 x s32>) = G_MUL %0, %2(<4 x s32>)
168 $q0 = COPY %3(<4 x s32>)