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
4 target triple = "aarch64-unknown-linux-gnu"
6 define <4 x i8> @load_v4i8(ptr %a) {
7 ; CHECK-LABEL: load_v4i8:
9 ; CHECK-NEXT: ptrue p0.h, vl4
10 ; CHECK-NEXT: ld1b { z0.h }, p0/z, [x0]
11 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
13 %load = load <4 x i8>, ptr %a
17 define <8 x i8> @load_v8i8(ptr %a) {
18 ; CHECK-LABEL: load_v8i8:
20 ; CHECK-NEXT: ldr d0, [x0]
22 %load = load <8 x i8>, ptr %a
26 define <16 x i8> @load_v16i8(ptr %a) {
27 ; CHECK-LABEL: load_v16i8:
29 ; CHECK-NEXT: ldr q0, [x0]
31 %load = load <16 x i8>, ptr %a
35 define <32 x i8> @load_v32i8(ptr %a) {
36 ; CHECK-LABEL: load_v32i8:
38 ; CHECK-NEXT: ldp q0, q1, [x0]
40 %load = load <32 x i8>, ptr %a
44 define <2 x i16> @load_v2i16(ptr %a) {
45 ; CHECK-LABEL: load_v2i16:
47 ; CHECK-NEXT: sub sp, sp, #16
48 ; CHECK-NEXT: .cfi_def_cfa_offset 16
49 ; CHECK-NEXT: ldrh w8, [x0, #2]
50 ; CHECK-NEXT: str w8, [sp, #12]
51 ; CHECK-NEXT: ldrh w8, [x0]
52 ; CHECK-NEXT: str w8, [sp, #8]
53 ; CHECK-NEXT: ldr d0, [sp, #8]
54 ; CHECK-NEXT: add sp, sp, #16
56 %load = load <2 x i16>, ptr %a
60 define <2 x half> @load_v2f16(ptr %a) {
61 ; CHECK-LABEL: load_v2f16:
63 ; CHECK-NEXT: ldr s0, [x0]
65 %load = load <2 x half>, ptr %a
69 define <4 x i16> @load_v4i16(ptr %a) {
70 ; CHECK-LABEL: load_v4i16:
72 ; CHECK-NEXT: ldr d0, [x0]
74 %load = load <4 x i16>, ptr %a
78 define <4 x half> @load_v4f16(ptr %a) {
79 ; CHECK-LABEL: load_v4f16:
81 ; CHECK-NEXT: ldr d0, [x0]
83 %load = load <4 x half>, ptr %a
87 define <8 x i16> @load_v8i16(ptr %a) {
88 ; CHECK-LABEL: load_v8i16:
90 ; CHECK-NEXT: ldr q0, [x0]
92 %load = load <8 x i16>, ptr %a
96 define <8 x half> @load_v8f16(ptr %a) {
97 ; CHECK-LABEL: load_v8f16:
99 ; CHECK-NEXT: ldr q0, [x0]
101 %load = load <8 x half>, ptr %a
105 define <16 x i16> @load_v16i16(ptr %a) {
106 ; CHECK-LABEL: load_v16i16:
108 ; CHECK-NEXT: ldp q0, q1, [x0]
110 %load = load <16 x i16>, ptr %a
114 define <16 x half> @load_v16f16(ptr %a) {
115 ; CHECK-LABEL: load_v16f16:
117 ; CHECK-NEXT: ldp q0, q1, [x0]
119 %load = load <16 x half>, ptr %a
120 ret <16 x half> %load
123 define <2 x i32> @load_v2i32(ptr %a) {
124 ; CHECK-LABEL: load_v2i32:
126 ; CHECK-NEXT: ldr d0, [x0]
128 %load = load <2 x i32>, ptr %a
132 define <2 x float> @load_v2f32(ptr %a) {
133 ; CHECK-LABEL: load_v2f32:
135 ; CHECK-NEXT: ldr d0, [x0]
137 %load = load <2 x float>, ptr %a
138 ret <2 x float> %load
141 define <4 x i32> @load_v4i32(ptr %a) {
142 ; CHECK-LABEL: load_v4i32:
144 ; CHECK-NEXT: ldr q0, [x0]
146 %load = load <4 x i32>, ptr %a
150 define <4 x float> @load_v4f32(ptr %a) {
151 ; CHECK-LABEL: load_v4f32:
153 ; CHECK-NEXT: ldr q0, [x0]
155 %load = load <4 x float>, ptr %a
156 ret <4 x float> %load
159 define <8 x i32> @load_v8i32(ptr %a) {
160 ; CHECK-LABEL: load_v8i32:
162 ; CHECK-NEXT: ldp q0, q1, [x0]
164 %load = load <8 x i32>, ptr %a
168 define <8 x float> @load_v8f32(ptr %a) {
169 ; CHECK-LABEL: load_v8f32:
171 ; CHECK-NEXT: ldp q0, q1, [x0]
173 %load = load <8 x float>, ptr %a
174 ret <8 x float> %load
177 define <1 x i64> @load_v1i64(ptr %a) {
178 ; CHECK-LABEL: load_v1i64:
180 ; CHECK-NEXT: ldr d0, [x0]
182 %load = load <1 x i64>, ptr %a
186 define <1 x double> @load_v1f64(ptr %a) {
187 ; CHECK-LABEL: load_v1f64:
189 ; CHECK-NEXT: ldr d0, [x0]
191 %load = load <1 x double>, ptr %a
192 ret <1 x double> %load
195 define <2 x i64> @load_v2i64(ptr %a) {
196 ; CHECK-LABEL: load_v2i64:
198 ; CHECK-NEXT: ldr q0, [x0]
200 %load = load <2 x i64>, ptr %a
204 define <2 x double> @load_v2f64(ptr %a) {
205 ; CHECK-LABEL: load_v2f64:
207 ; CHECK-NEXT: ldr q0, [x0]
209 %load = load <2 x double>, ptr %a
210 ret <2 x double> %load
213 define <4 x i64> @load_v4i64(ptr %a) {
214 ; CHECK-LABEL: load_v4i64:
216 ; CHECK-NEXT: ldp q0, q1, [x0]
218 %load = load <4 x i64>, ptr %a
222 define <4 x double> @load_v4f64(ptr %a) {
223 ; CHECK-LABEL: load_v4f64:
225 ; CHECK-NEXT: ldp q0, q1, [x0]
227 %load = load <4 x double>, ptr %a
228 ret <4 x double> %load