1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -verify-machineinstrs -mtriple aarch64-unknown-unknown -run-pass=instruction-select %s -o - | FileCheck %s
8 tracksRegLiveness: true
13 ; CHECK-LABEL: name: v8s16_gpr
14 ; CHECK: liveins: $q1, $w0
15 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
16 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
17 ; CHECK: [[INSvi16gpr:%[0-9]+]]:fpr128 = INSvi16gpr [[COPY1]], 1, [[COPY]]
18 ; CHECK: $q0 = COPY [[INSvi16gpr]]
19 ; CHECK: RET_ReallyLR implicit $q0
20 %0:gpr(s32) = COPY $w0
21 %trunc:gpr(s16) = G_TRUNC %0
22 %1:fpr(<8 x s16>) = COPY $q1
23 %3:gpr(s32) = G_CONSTANT i32 1
24 %2:fpr(<8 x s16>) = G_INSERT_VECTOR_ELT %1, %trunc:gpr(s16), %3:gpr(s32)
25 $q0 = COPY %2(<8 x s16>)
26 RET_ReallyLR implicit $q0
34 tracksRegLiveness: true
39 ; CHECK-LABEL: name: v8s16_fpr
40 ; CHECK: liveins: $q1, $h0
41 ; CHECK: [[COPY:%[0-9]+]]:fpr16 = COPY $h0
42 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
43 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
44 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.hsub
45 ; CHECK: [[INSvi16lane:%[0-9]+]]:fpr128 = INSvi16lane [[COPY1]], 1, [[INSERT_SUBREG]], 0
46 ; CHECK: $q0 = COPY [[INSvi16lane]]
47 ; CHECK: RET_ReallyLR implicit $q0
48 %0:fpr(s16) = COPY $h0
49 %1:fpr(<8 x s16>) = COPY $q1
50 %3:gpr(s32) = G_CONSTANT i32 1
51 %2:fpr(<8 x s16>) = G_INSERT_VECTOR_ELT %1, %0(s16), %3(s32)
52 $q0 = COPY %2(<8 x s16>)
53 RET_ReallyLR implicit $q0
61 tracksRegLiveness: true
66 ; CHECK-LABEL: name: v4s32_fpr
67 ; CHECK: liveins: $q1, $s0
68 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
69 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
70 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
71 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.ssub
72 ; CHECK: [[INSvi32lane:%[0-9]+]]:fpr128 = INSvi32lane [[COPY1]], 1, [[INSERT_SUBREG]], 0
73 ; CHECK: $q0 = COPY [[INSvi32lane]]
74 ; CHECK: RET_ReallyLR implicit $q0
75 %0:fpr(s32) = COPY $s0
76 %1:fpr(<4 x s32>) = COPY $q1
77 %3:gpr(s32) = G_CONSTANT i32 1
78 %2:fpr(<4 x s32>) = G_INSERT_VECTOR_ELT %1, %0(s32), %3(s32)
79 $q0 = COPY %2(<4 x s32>)
80 RET_ReallyLR implicit $q0
88 tracksRegLiveness: true
93 ; CHECK-LABEL: name: v4s32_gpr
94 ; CHECK: liveins: $q0, $w0
95 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
96 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q0
97 ; CHECK: [[INSvi32gpr:%[0-9]+]]:fpr128 = INSvi32gpr [[COPY1]], 1, [[COPY]]
98 ; CHECK: $q0 = COPY [[INSvi32gpr]]
99 ; CHECK: RET_ReallyLR implicit $q0
100 %0:gpr(s32) = COPY $w0
101 %1:fpr(<4 x s32>) = COPY $q0
102 %3:gpr(s32) = G_CONSTANT i32 1
103 %2:fpr(<4 x s32>) = G_INSERT_VECTOR_ELT %1, %0(s32), %3(s32)
104 $q0 = COPY %2(<4 x s32>)
105 RET_ReallyLR implicit $q0
112 regBankSelected: true
113 tracksRegLiveness: true
118 ; CHECK-LABEL: name: v2s64_fpr
119 ; CHECK: liveins: $d0, $q1
120 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
121 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
122 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
123 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
124 ; CHECK: [[INSvi64lane:%[0-9]+]]:fpr128 = INSvi64lane [[COPY1]], 1, [[INSERT_SUBREG]], 0
125 ; CHECK: $q0 = COPY [[INSvi64lane]]
126 ; CHECK: RET_ReallyLR implicit $q0
127 %0:fpr(s64) = COPY $d0
128 %1:fpr(<2 x s64>) = COPY $q1
129 %3:gpr(s32) = G_CONSTANT i32 1
130 %2:fpr(<2 x s64>) = G_INSERT_VECTOR_ELT %1, %0(s64), %3(s32)
131 $q0 = COPY %2(<2 x s64>)
132 RET_ReallyLR implicit $q0
139 regBankSelected: true
140 tracksRegLiveness: true
145 ; CHECK-LABEL: name: v2s64_gpr
146 ; CHECK: liveins: $q0, $x0
147 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
148 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q0
149 ; CHECK: [[INSvi64gpr:%[0-9]+]]:fpr128 = INSvi64gpr [[COPY1]], 0, [[COPY]]
150 ; CHECK: $q0 = COPY [[INSvi64gpr]]
151 ; CHECK: RET_ReallyLR implicit $q0
152 %0:gpr(s64) = COPY $x0
153 %1:fpr(<2 x s64>) = COPY $q0
154 %3:gpr(s32) = G_CONSTANT i32 0
155 %2:fpr(<2 x s64>) = G_INSERT_VECTOR_ELT %1, %0(s64), %3(s32)
156 $q0 = COPY %2(<2 x s64>)
157 RET_ReallyLR implicit $q0
164 regBankSelected: true
165 tracksRegLiveness: true
170 ; CHECK-LABEL: name: v2s32_fpr
171 ; CHECK: liveins: $d1, $s0
172 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
173 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
174 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
175 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY1]], %subreg.dsub
176 ; CHECK: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
177 ; CHECK: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], [[COPY]], %subreg.ssub
178 ; CHECK: [[INSvi32lane:%[0-9]+]]:fpr128 = INSvi32lane [[INSERT_SUBREG]], 1, [[INSERT_SUBREG1]], 0
179 ; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY [[INSvi32lane]].dsub
180 ; CHECK: $d0 = COPY [[COPY2]]
181 ; CHECK: RET_ReallyLR implicit $d0
182 %0:fpr(s32) = COPY $s0
183 %1:fpr(<2 x s32>) = COPY $d1
184 %3:gpr(s32) = G_CONSTANT i32 1
185 %2:fpr(<2 x s32>) = G_INSERT_VECTOR_ELT %1, %0(s32), %3(s32)
186 $d0 = COPY %2(<2 x s32>)
187 RET_ReallyLR implicit $d0
194 regBankSelected: true
195 tracksRegLiveness: true
200 ; CHECK-LABEL: name: v2s32_gpr
201 ; CHECK: liveins: $d0, $w0
202 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
203 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d0
204 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
205 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY1]], %subreg.dsub
206 ; CHECK: [[INSvi32gpr:%[0-9]+]]:fpr128 = INSvi32gpr [[INSERT_SUBREG]], 1, [[COPY]]
207 ; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY [[INSvi32gpr]].dsub
208 ; CHECK: $d0 = COPY [[COPY2]]
209 ; CHECK: RET_ReallyLR implicit $d0
210 %0:gpr(s32) = COPY $w0
211 %1:fpr(<2 x s32>) = COPY $d0
212 %3:gpr(s32) = G_CONSTANT i32 1
213 %2:fpr(<2 x s32>) = G_INSERT_VECTOR_ELT %1, %0(s32), %3(s32)
214 $d0 = COPY %2(<2 x s32>)
215 RET_ReallyLR implicit $d0