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
6 target triple = "aarch64-unknown-linux-gnu"
8 define void @store_trunc_v8i16i8(ptr %ap, ptr %dest) {
9 ; CHECK-LABEL: store_trunc_v8i16i8:
11 ; CHECK-NEXT: ptrue p0.h, vl8
12 ; CHECK-NEXT: ldr q0, [x0]
13 ; CHECK-NEXT: st1b { z0.h }, p0, [x1]
15 %a = load <8 x i16>, ptr %ap
16 %val = trunc <8 x i16> %a to <8 x i8>
17 store <8 x i8> %val, ptr %dest
21 define void @store_trunc_v4i32i8(ptr %ap, ptr %dest) {
22 ; CHECK-LABEL: store_trunc_v4i32i8:
24 ; CHECK-NEXT: ptrue p0.s, vl4
25 ; CHECK-NEXT: ldr q0, [x0]
26 ; CHECK-NEXT: st1b { z0.s }, p0, [x1]
28 %a = load <4 x i32>, ptr %ap
29 %val = trunc <4 x i32> %a to <4 x i8>
30 store <4 x i8> %val, ptr %dest
34 define void @store_trunc_v4i32i16(ptr %ap, ptr %dest) {
35 ; CHECK-LABEL: store_trunc_v4i32i16:
37 ; CHECK-NEXT: ptrue p0.s, vl4
38 ; CHECK-NEXT: ldr q0, [x0]
39 ; CHECK-NEXT: st1h { z0.s }, p0, [x1]
41 %a = load <4 x i32>, ptr %ap
42 %val = trunc <4 x i32> %a to <4 x i16>
43 store <4 x i16> %val, ptr %dest
47 define void @store_trunc_v2i64i8(ptr %ap, ptr %dest) {
48 ; CHECK-LABEL: store_trunc_v2i64i8:
50 ; CHECK-NEXT: ptrue p0.d, vl2
51 ; CHECK-NEXT: ldr q0, [x0]
52 ; CHECK-NEXT: st1w { z0.d }, p0, [x1]
54 %a = load <2 x i64>, ptr %ap
55 %val = trunc <2 x i64> %a to <2 x i32>
56 store <2 x i32> %val, ptr %dest
60 define void @store_trunc_v2i256i64(ptr %ap, ptr %dest) {
61 ; CHECK-LABEL: store_trunc_v2i256i64:
63 ; CHECK-NEXT: ptrue p0.d, vl1
64 ; CHECK-NEXT: ldr d0, [x0, #32]
65 ; CHECK-NEXT: ldr d1, [x0]
66 ; CHECK-NEXT: splice z1.d, p0, z1.d, z0.d
67 ; CHECK-NEXT: str q1, [x1]
69 %a = load <2 x i256>, ptr %ap
70 %val = trunc <2 x i256> %a to <2 x i64>
71 store <2 x i64> %val, ptr %dest