1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible-sve < %s | FileCheck %s
3 ; RUN: llc -mattr=+sme -force-streaming-compatible-sve < %s | FileCheck %s
5 target triple = "aarch64-unknown-linux-gnu"
7 define <4 x i8> @load_v4i8(ptr %a) {
8 ; CHECK-LABEL: load_v4i8:
10 ; CHECK-NEXT: ptrue p0.h, vl4
11 ; CHECK-NEXT: ld1b { z0.h }, p0/z, [x0]
12 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
14 %load = load <4 x i8>, ptr %a
18 define <8 x i8> @load_v8i8(ptr %a) {
19 ; CHECK-LABEL: load_v8i8:
21 ; CHECK-NEXT: ldr d0, [x0]
23 %load = load <8 x i8>, ptr %a
27 define <16 x i8> @load_v16i8(ptr %a) {
28 ; CHECK-LABEL: load_v16i8:
30 ; CHECK-NEXT: ldr q0, [x0]
32 %load = load <16 x i8>, ptr %a
36 define <32 x i8> @load_v32i8(ptr %a) {
37 ; CHECK-LABEL: load_v32i8:
39 ; CHECK-NEXT: ldp q0, q1, [x0]
41 %load = load <32 x i8>, ptr %a
45 define <2 x i16> @load_v2i16(ptr %a) {
46 ; CHECK-LABEL: load_v2i16:
48 ; CHECK-NEXT: sub sp, sp, #16
49 ; CHECK-NEXT: .cfi_def_cfa_offset 16
50 ; CHECK-NEXT: ldrh w8, [x0, #2]
51 ; CHECK-NEXT: str w8, [sp, #12]
52 ; CHECK-NEXT: ldrh w8, [x0]
53 ; CHECK-NEXT: str w8, [sp, #8]
54 ; CHECK-NEXT: ldr d0, [sp, #8]
55 ; CHECK-NEXT: add sp, sp, #16
57 %load = load <2 x i16>, ptr %a
61 define <2 x half> @load_v2f16(ptr %a) {
62 ; CHECK-LABEL: load_v2f16:
64 ; CHECK-NEXT: ldr s0, [x0]
66 %load = load <2 x half>, ptr %a
70 define <4 x i16> @load_v4i16(ptr %a) {
71 ; CHECK-LABEL: load_v4i16:
73 ; CHECK-NEXT: ldr d0, [x0]
75 %load = load <4 x i16>, ptr %a
79 define <4 x half> @load_v4f16(ptr %a) {
80 ; CHECK-LABEL: load_v4f16:
82 ; CHECK-NEXT: ldr d0, [x0]
84 %load = load <4 x half>, ptr %a
88 define <8 x i16> @load_v8i16(ptr %a) {
89 ; CHECK-LABEL: load_v8i16:
91 ; CHECK-NEXT: ldr q0, [x0]
93 %load = load <8 x i16>, ptr %a
97 define <8 x half> @load_v8f16(ptr %a) {
98 ; CHECK-LABEL: load_v8f16:
100 ; CHECK-NEXT: ldr q0, [x0]
102 %load = load <8 x half>, ptr %a
106 define <16 x i16> @load_v16i16(ptr %a) {
107 ; CHECK-LABEL: load_v16i16:
109 ; CHECK-NEXT: ldp q0, q1, [x0]
111 %load = load <16 x i16>, ptr %a
115 define <16 x half> @load_v16f16(ptr %a) {
116 ; CHECK-LABEL: load_v16f16:
118 ; CHECK-NEXT: ldp q0, q1, [x0]
120 %load = load <16 x half>, ptr %a
121 ret <16 x half> %load
124 define <2 x i32> @load_v2i32(ptr %a) {
125 ; CHECK-LABEL: load_v2i32:
127 ; CHECK-NEXT: ldr d0, [x0]
129 %load = load <2 x i32>, ptr %a
133 define <2 x float> @load_v2f32(ptr %a) {
134 ; CHECK-LABEL: load_v2f32:
136 ; CHECK-NEXT: ldr d0, [x0]
138 %load = load <2 x float>, ptr %a
139 ret <2 x float> %load
142 define <4 x i32> @load_v4i32(ptr %a) {
143 ; CHECK-LABEL: load_v4i32:
145 ; CHECK-NEXT: ldr q0, [x0]
147 %load = load <4 x i32>, ptr %a
151 define <4 x float> @load_v4f32(ptr %a) {
152 ; CHECK-LABEL: load_v4f32:
154 ; CHECK-NEXT: ldr q0, [x0]
156 %load = load <4 x float>, ptr %a
157 ret <4 x float> %load
160 define <8 x i32> @load_v8i32(ptr %a) {
161 ; CHECK-LABEL: load_v8i32:
163 ; CHECK-NEXT: ldp q0, q1, [x0]
165 %load = load <8 x i32>, ptr %a
169 define <8 x float> @load_v8f32(ptr %a) {
170 ; CHECK-LABEL: load_v8f32:
172 ; CHECK-NEXT: ldp q0, q1, [x0]
174 %load = load <8 x float>, ptr %a
175 ret <8 x float> %load
178 define <1 x i64> @load_v1i64(ptr %a) {
179 ; CHECK-LABEL: load_v1i64:
181 ; CHECK-NEXT: ldr d0, [x0]
183 %load = load <1 x i64>, ptr %a
187 define <1 x double> @load_v1f64(ptr %a) {
188 ; CHECK-LABEL: load_v1f64:
190 ; CHECK-NEXT: ldr d0, [x0]
192 %load = load <1 x double>, ptr %a
193 ret <1 x double> %load
196 define <2 x i64> @load_v2i64(ptr %a) {
197 ; CHECK-LABEL: load_v2i64:
199 ; CHECK-NEXT: ldr q0, [x0]
201 %load = load <2 x i64>, ptr %a
205 define <2 x double> @load_v2f64(ptr %a) {
206 ; CHECK-LABEL: load_v2f64:
208 ; CHECK-NEXT: ldr q0, [x0]
210 %load = load <2 x double>, ptr %a
211 ret <2 x double> %load
214 define <4 x i64> @load_v4i64(ptr %a) {
215 ; CHECK-LABEL: load_v4i64:
217 ; CHECK-NEXT: ldp q0, q1, [x0]
219 %load = load <4 x i64>, ptr %a
223 define <4 x double> @load_v4f64(ptr %a) {
224 ; CHECK-LABEL: load_v4f64:
226 ; CHECK-NEXT: ldp q0, q1, [x0]
228 %load = load <4 x double>, ptr %a
229 ret <4 x double> %load