1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc < %s | FileCheck %s
3 ; RUN: llc -aarch64-sve-vector-bits-min=256 < %s | FileCheck %s
4 ; RUN: llc -aarch64-sve-vector-bits-min=512 < %s | FileCheck %s
6 target triple = "aarch64-unknown-linux-gnu"
8 declare void @foo_v32i8(<32 x i8>)
9 define void @test_v32i8(<32 x i8> %unused, <32 x i8> %a) #0 {
10 ; CHECK-LABEL: test_v32i8:
12 ; CHECK-NEXT: mov v1.16b, v3.16b
13 ; CHECK-NEXT: mov v0.16b, v2.16b
14 ; CHECK-NEXT: b foo_v32i8
15 tail call void @foo_v32i8(<32 x i8> %a)
19 declare void @foo_v16i16(<16 x i16>)
20 define void @test_v16i16(<16 x i16> %unused, <16 x i16> %a) #0 {
21 ; CHECK-LABEL: test_v16i16:
23 ; CHECK-NEXT: mov v1.16b, v3.16b
24 ; CHECK-NEXT: mov v0.16b, v2.16b
25 ; CHECK-NEXT: b foo_v16i16
26 tail call void @foo_v16i16(<16 x i16> %a)
30 declare void @foo_v8i32(<8 x i32>)
31 define void @test_v8i32(<8 x i32> %unused, <8 x i32> %a) #0 {
32 ; CHECK-LABEL: test_v8i32:
34 ; CHECK-NEXT: mov v1.16b, v3.16b
35 ; CHECK-NEXT: mov v0.16b, v2.16b
36 ; CHECK-NEXT: b foo_v8i32
37 tail call void @foo_v8i32(<8 x i32> %a)
41 declare void @foo_v4i64(<4 x i64>)
42 define void @test_v4i64(<4 x i64> %unused, <4 x i64> %a) #0 {
43 ; CHECK-LABEL: test_v4i64:
45 ; CHECK-NEXT: mov v1.16b, v3.16b
46 ; CHECK-NEXT: mov v0.16b, v2.16b
47 ; CHECK-NEXT: b foo_v4i64
48 tail call void @foo_v4i64(<4 x i64> %a)
52 declare void @foo_v16f16(<16 x half>)
53 define void @test_v16f16(<16 x half> %unused, <16 x half> %a) #0 {
54 ; CHECK-LABEL: test_v16f16:
56 ; CHECK-NEXT: mov v1.16b, v3.16b
57 ; CHECK-NEXT: mov v0.16b, v2.16b
58 ; CHECK-NEXT: b foo_v16f16
59 tail call void @foo_v16f16(<16 x half> %a)
63 declare void @foo_v8f32(<8 x float>)
64 define void @test_v8f32(<8 x float> %unused, <8 x float> %a) #0 {
65 ; CHECK-LABEL: test_v8f32:
67 ; CHECK-NEXT: mov v1.16b, v3.16b
68 ; CHECK-NEXT: mov v0.16b, v2.16b
69 ; CHECK-NEXT: b foo_v8f32
70 tail call void @foo_v8f32(<8 x float> %a)
74 declare void @foo_v4f64(<4 x double>)
75 define void @test_v4f64(<4 x double> %unused, <4 x double> %a) #0 {
76 ; CHECK-LABEL: test_v4f64:
78 ; CHECK-NEXT: mov v1.16b, v3.16b
79 ; CHECK-NEXT: mov v0.16b, v2.16b
80 ; CHECK-NEXT: b foo_v4f64
81 tail call void @foo_v4f64(<4 x double> %a)
85 declare void @foo_v16bf16(<16 x bfloat>)
86 define void @test_v16bf16(<16 x bfloat> %unused, <16 x bfloat> %a) #0 {
87 ; CHECK-LABEL: test_v16bf16:
89 ; CHECK-NEXT: mov v1.16b, v3.16b
90 ; CHECK-NEXT: mov v0.16b, v2.16b
91 ; CHECK-NEXT: b foo_v16bf16
92 tail call void @foo_v16bf16(<16 x bfloat> %a)
96 declare void @foo_v3i64(<3 x i64>)
97 define void @test_v3i64(<3 x i64> %unused, <3 x i64> %a) #0 {
98 ; CHECK-LABEL: test_v3i64:
100 ; CHECK-NEXT: fmov d2, d5
101 ; CHECK-NEXT: fmov d1, d4
102 ; CHECK-NEXT: fmov d0, d3
103 ; CHECK-NEXT: b foo_v3i64
104 tail call void @foo_v3i64(<3 x i64> %a)
108 declare void @foo_v5i64(<5 x i64>)
109 define void @test_v5i64(<5 x i64> %unused, <5 x i64> %a) #0 {
110 ; CHECK-LABEL: test_v5i64:
112 ; CHECK-NEXT: fmov d1, d6
113 ; CHECK-NEXT: fmov d0, d5
114 ; CHECK-NEXT: fmov d2, d7
115 ; CHECK-NEXT: ldp d3, d4, [sp]
116 ; CHECK-NEXT: b foo_v5i64
117 tail call void @foo_v5i64(<5 x i64> %a)
121 declare void @foo_v1i16(<1 x i16>)
122 define void @test_v1i16(<1 x i16> %unused, <1 x i16> %a) #0 {
123 ; CHECK-LABEL: test_v1i16:
125 ; CHECK-NEXT: fmov d0, d1
126 ; CHECK-NEXT: b foo_v1i16
127 tail call void @foo_v1i16(<1 x i16> %a)
131 declare void @foo_v9i16(<9 x i16>)
132 define void @test_v9i16(<9 x i16> %unused, <9 x i16> %a) #0 {
133 ; CHECK-LABEL: test_v9i16:
135 ; CHECK-NEXT: ldr w0, [sp, #8]
136 ; CHECK-NEXT: ldr w1, [sp, #16]
137 ; CHECK-NEXT: ldr w2, [sp, #24]
138 ; CHECK-NEXT: ldr w3, [sp, #32]
139 ; CHECK-NEXT: ldr w4, [sp, #40]
140 ; CHECK-NEXT: ldr w5, [sp, #48]
141 ; CHECK-NEXT: ldr w6, [sp, #56]
142 ; CHECK-NEXT: ldr w7, [sp, #64]
143 ; CHECK-NEXT: ldr w8, [sp, #72]
144 ; CHECK-NEXT: str w8, [sp]
145 ; CHECK-NEXT: b foo_v9i16
146 tail call void @foo_v9i16(<9 x i16> %a)
150 declare void @foo_v16i1(<16 x i1>)
151 define void @test_v16i1(<16 x i1> %unused, <16 x i1> %a) #0 {
152 ; CHECK-LABEL: test_v16i1:
154 ; CHECK-NEXT: mov v0.16b, v1.16b
155 ; CHECK-NEXT: b foo_v16i1
156 tail call void @foo_v16i1(<16 x i1> %a)
160 ; UTC_ARGS: --disable
161 ; The output from this test is large and generally not useful, what matters is
162 ; no vector registers are used.
163 declare void @foo_v32i1(<32 x i1>)
164 define void @test_v32i1(<32 x i1> %unused, <32 x i1> %a) #0 {
165 ; CHECK-LABEL: test_v32i1:
167 ; CHECK-NOT: [q,v,z][0-9]+
169 tail call void @foo_v32i1(<32 x i1> %a)
174 declare void @foo_v1i128(<1 x i128>)
175 define void @test_v1i128(<1 x i128> %unused, <1 x i128> %a) #0 {
176 ; CHECK-LABEL: test_v1i128:
178 ; CHECK-NEXT: mov x1, x3
179 ; CHECK-NEXT: mov x0, x2
180 ; CHECK-NEXT: b foo_v1i128
181 tail call void @foo_v1i128(<1 x i128> %a)
185 declare void @foo_v2i128(<2 x i128>)
186 define void @test_v2i128(<2 x i128> %unused, <2 x i128> %a) #0 {
187 ; CHECK-LABEL: test_v2i128:
189 ; CHECK-NEXT: mov x3, x7
190 ; CHECK-NEXT: mov x2, x6
191 ; CHECK-NEXT: mov x0, x4
192 ; CHECK-NEXT: mov x1, x5
193 ; CHECK-NEXT: b foo_v2i128
194 tail call void @foo_v2i128(<2 x i128> %a)
198 declare void @foo_v1i256(<1 x i256>)
199 define void @test_v1i256(<1 x i256> %unused, <1 x i256> %a) #0 {
200 ; CHECK-LABEL: test_v1i256:
202 ; CHECK-NEXT: mov x3, x7
203 ; CHECK-NEXT: mov x2, x6
204 ; CHECK-NEXT: mov x0, x4
205 ; CHECK-NEXT: mov x1, x5
206 ; CHECK-NEXT: b foo_v1i256
207 tail call void @foo_v1i256(<1 x i256> %a)
211 declare void @foo_v2i256(<2 x i256>)
212 define void @test_v2i256(<2 x i256> %unused, <2 x i256> %a) #0 {
213 ; CHECK-LABEL: test_v2i256:
215 ; CHECK-NEXT: ldp x0, x1, [sp]
216 ; CHECK-NEXT: ldp x2, x3, [sp, #16]
217 ; CHECK-NEXT: ldp x4, x5, [sp, #32]
218 ; CHECK-NEXT: ldp x6, x7, [sp, #48]
219 ; CHECK-NEXT: b foo_v2i256
220 tail call void @foo_v2i256(<2 x i256> %a)
224 declare void @foo_v1f128(<1 x fp128>)
225 define void @test_v1f128(<1 x fp128> %unused, <1 x fp128> %a) #0 {
226 ; CHECK-LABEL: test_v1f128:
228 ; CHECK-NEXT: mov v0.16b, v1.16b
229 ; CHECK-NEXT: b foo_v1f128
230 tail call void @foo_v1f128(<1 x fp128> %a)
234 declare void @foo_v2f128(<2 x fp128>)
235 define void @test_v2f128(<2 x fp128> %unused, <2 x fp128> %a) #0 {
236 ; CHECK-LABEL: test_v2f128:
238 ; CHECK-NEXT: mov v1.16b, v3.16b
239 ; CHECK-NEXT: mov v0.16b, v2.16b
240 ; CHECK-NEXT: b foo_v2f128
241 tail call void @foo_v2f128(<2 x fp128> %a)
245 attributes #0 = { "target-features"="+sve,+bf16" nounwind }