1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
4 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5 target triple = "aarch64"
7 define <4 x float> @test_f32(float %a, float %b, float %c, float %d) {
11 define <2 x double> @test_f64(double %a, double %b) {
12 ret <2 x double> undef
15 define <4 x i32> @test_i32(i32 %a, i32 %b, i32 %c, i32 %d) {
19 define <2 x i64> @test_i64(i64 %a, i64 %b) {
27 exposesReturnsTwice: false
32 tracksRegLiveness: true
34 - { id: 0, class: fpr, preferred-register: '' }
35 - { id: 1, class: fpr, preferred-register: '' }
36 - { id: 2, class: fpr, preferred-register: '' }
37 - { id: 3, class: fpr, preferred-register: '' }
38 - { id: 4, class: fpr, preferred-register: '' }
39 - { id: 5, class: _, preferred-register: '' }
40 - { id: 6, class: _, preferred-register: '' }
41 - { id: 7, class: _, preferred-register: '' }
42 - { id: 8, class: _, preferred-register: '' }
43 - { id: 9, class: _, preferred-register: '' }
44 - { id: 10, class: _, preferred-register: '' }
45 - { id: 11, class: _, preferred-register: '' }
46 - { id: 12, class: _, preferred-register: '' }
47 - { id: 13, class: gpr, preferred-register: '' }
48 - { id: 14, class: gpr, preferred-register: '' }
49 - { id: 15, class: gpr, preferred-register: '' }
50 - { id: 16, class: gpr, preferred-register: '' }
53 isFrameAddressTaken: false
54 isReturnAddressTaken: false
64 hasOpaqueSPAdjustment: false
66 hasMustTailInVarArgFunc: false
75 liveins: $s0, $s1, $s2, $s3
77 ; CHECK-LABEL: name: test_f32
78 ; CHECK: liveins: $s0, $s1, $s2, $s3
79 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
80 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
81 ; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY $s2
82 ; CHECK: [[COPY3:%[0-9]+]]:fpr32 = COPY $s3
83 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
84 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.ssub
85 ; CHECK: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
86 ; CHECK: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], [[COPY1]], %subreg.ssub
87 ; CHECK: [[INSvi32lane:%[0-9]+]]:fpr128 = INSvi32lane [[INSERT_SUBREG]], 1, [[INSERT_SUBREG1]], 0
88 ; CHECK: [[DEF2:%[0-9]+]]:fpr128 = IMPLICIT_DEF
89 ; CHECK: [[INSERT_SUBREG2:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF2]], [[COPY2]], %subreg.ssub
90 ; CHECK: [[INSvi32lane1:%[0-9]+]]:fpr128 = INSvi32lane [[INSvi32lane]], 2, [[INSERT_SUBREG2]], 0
91 ; CHECK: [[DEF3:%[0-9]+]]:fpr128 = IMPLICIT_DEF
92 ; CHECK: [[INSERT_SUBREG3:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF3]], [[COPY3]], %subreg.ssub
93 ; CHECK: [[INSvi32lane2:%[0-9]+]]:fpr128 = INSvi32lane [[INSvi32lane1]], 3, [[INSERT_SUBREG3]], 0
94 ; CHECK: $q0 = COPY [[INSvi32lane2]]
95 ; CHECK: RET_ReallyLR implicit $q0
96 %0:fpr(s32) = COPY $s0
97 %1:fpr(s32) = COPY $s1
98 %2:fpr(s32) = COPY $s2
99 %3:fpr(s32) = COPY $s3
100 %4:fpr(<4 x s32>) = G_BUILD_VECTOR %0(s32), %1(s32), %2(s32), %3(s32)
101 $q0 = COPY %4(<4 x s32>)
102 RET_ReallyLR implicit $q0
108 exposesReturnsTwice: false
110 regBankSelected: true
113 tracksRegLiveness: true
115 - { id: 0, class: fpr, preferred-register: '' }
116 - { id: 1, class: fpr, preferred-register: '' }
117 - { id: 2, class: fpr, preferred-register: '' }
118 - { id: 3, class: fpr, preferred-register: '' }
119 - { id: 4, class: fpr, preferred-register: '' }
120 - { id: 5, class: _, preferred-register: '' }
121 - { id: 6, class: _, preferred-register: '' }
122 - { id: 7, class: _, preferred-register: '' }
123 - { id: 8, class: _, preferred-register: '' }
124 - { id: 9, class: gpr, preferred-register: '' }
125 - { id: 10, class: gpr, preferred-register: '' }
128 isFrameAddressTaken: false
129 isReturnAddressTaken: false
139 hasOpaqueSPAdjustment: false
141 hasMustTailInVarArgFunc: false
150 liveins: $d0, $d1, $d2, $d3
152 ; CHECK-LABEL: name: test_f64
153 ; CHECK: liveins: $d0, $d1, $d2, $d3
154 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
155 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
156 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
157 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
158 ; CHECK: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
159 ; CHECK: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], [[COPY1]], %subreg.dsub
160 ; CHECK: [[INSvi64lane:%[0-9]+]]:fpr128 = INSvi64lane [[INSERT_SUBREG]], 1, [[INSERT_SUBREG1]], 0
161 ; CHECK: $q0 = COPY [[INSvi64lane]]
162 ; CHECK: RET_ReallyLR implicit $q0
163 %0:fpr(s64) = COPY $d0
164 %1:fpr(s64) = COPY $d1
165 %4:fpr(<2 x s64>) = G_BUILD_VECTOR %0(s64), %1(s64)
166 $q0 = COPY %4(<2 x s64>)
167 RET_ReallyLR implicit $q0
173 exposesReturnsTwice: false
175 regBankSelected: true
178 tracksRegLiveness: true
180 - { id: 0, class: gpr, preferred-register: '' }
181 - { id: 1, class: gpr, preferred-register: '' }
182 - { id: 2, class: gpr, preferred-register: '' }
183 - { id: 3, class: gpr, preferred-register: '' }
184 - { id: 4, class: fpr, preferred-register: '' }
185 - { id: 5, class: _, preferred-register: '' }
186 - { id: 6, class: _, preferred-register: '' }
187 - { id: 7, class: _, preferred-register: '' }
188 - { id: 8, class: _, preferred-register: '' }
189 - { id: 9, class: _, preferred-register: '' }
190 - { id: 10, class: _, preferred-register: '' }
191 - { id: 11, class: _, preferred-register: '' }
192 - { id: 12, class: _, preferred-register: '' }
195 isFrameAddressTaken: false
196 isReturnAddressTaken: false
206 hasOpaqueSPAdjustment: false
208 hasMustTailInVarArgFunc: false
217 liveins: $w0, $w1, $w2, $w3
219 ; CHECK-LABEL: name: test_i32
220 ; CHECK: liveins: $w0, $w1, $w2, $w3
221 ; CHECK: [[COPY:%[0-9]+]]:gpr32all = COPY $w0
222 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
223 ; CHECK: [[COPY2:%[0-9]+]]:gpr32 = COPY $w2
224 ; CHECK: [[COPY3:%[0-9]+]]:gpr32 = COPY $w3
225 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
226 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.ssub
227 ; CHECK: [[INSvi32gpr:%[0-9]+]]:fpr128 = INSvi32gpr [[INSERT_SUBREG]], 1, [[COPY1]]
228 ; CHECK: [[INSvi32gpr1:%[0-9]+]]:fpr128 = INSvi32gpr [[INSvi32gpr]], 2, [[COPY2]]
229 ; CHECK: [[INSvi32gpr2:%[0-9]+]]:fpr128 = INSvi32gpr [[INSvi32gpr1]], 3, [[COPY3]]
230 ; CHECK: $q0 = COPY [[INSvi32gpr2]]
231 ; CHECK: RET_ReallyLR implicit $q0
232 %0:gpr(s32) = COPY $w0
233 %1:gpr(s32) = COPY $w1
234 %2:gpr(s32) = COPY $w2
235 %3:gpr(s32) = COPY $w3
236 %4:fpr(<4 x s32>) = G_BUILD_VECTOR %0(s32), %1(s32), %2(s32), %3(s32)
237 $q0 = COPY %4(<4 x s32>)
238 RET_ReallyLR implicit $q0
244 exposesReturnsTwice: false
246 regBankSelected: true
249 tracksRegLiveness: true
251 - { id: 0, class: gpr, preferred-register: '' }
252 - { id: 1, class: gpr, preferred-register: '' }
253 - { id: 2, class: gpr, preferred-register: '' }
254 - { id: 3, class: gpr, preferred-register: '' }
255 - { id: 4, class: fpr, preferred-register: '' }
256 - { id: 5, class: _, preferred-register: '' }
257 - { id: 6, class: _, preferred-register: '' }
258 - { id: 7, class: _, preferred-register: '' }
259 - { id: 8, class: _, preferred-register: '' }
262 isFrameAddressTaken: false
263 isReturnAddressTaken: false
273 hasOpaqueSPAdjustment: false
275 hasMustTailInVarArgFunc: false
284 liveins: $x0, $x1, $x2, $x3
286 ; CHECK-LABEL: name: test_i64
287 ; CHECK: liveins: $x0, $x1, $x2, $x3
288 ; CHECK: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
289 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
290 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
291 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
292 ; CHECK: [[INSvi64gpr:%[0-9]+]]:fpr128 = INSvi64gpr [[INSERT_SUBREG]], 1, [[COPY1]]
293 ; CHECK: $q0 = COPY [[INSvi64gpr]]
294 ; CHECK: RET_ReallyLR implicit $q0
295 %0:gpr(s64) = COPY $x0
296 %1:gpr(s64) = COPY $x1
297 %4:fpr(<2 x s64>) = G_BUILD_VECTOR %0(s64), %1(s64)
298 $q0 = COPY %4(<2 x s64>)
299 RET_ReallyLR implicit $q0