1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2 < %s | FileCheck %s
3 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme -force-streaming < %s | FileCheck %s
9 define <vscale x 16 x i8> @sqxtnb_h(<vscale x 8 x i16> %a) {
10 ; CHECK-LABEL: sqxtnb_h:
12 ; CHECK-NEXT: sqxtnb z0.b, z0.h
14 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sqxtnb.nxv8i16(<vscale x 8 x i16> %a)
15 ret <vscale x 16 x i8> %out
18 define <vscale x 8 x i16> @sqxtnb_s(<vscale x 4 x i32> %a) {
19 ; CHECK-LABEL: sqxtnb_s:
21 ; CHECK-NEXT: sqxtnb z0.h, z0.s
23 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqxtnb.nxv4i32(<vscale x 4 x i32> %a)
24 ret <vscale x 8 x i16> %out
27 define <vscale x 4 x i32> @sqxtnb_d(<vscale x 2 x i64> %a) {
28 ; CHECK-LABEL: sqxtnb_d:
30 ; CHECK-NEXT: sqxtnb z0.s, z0.d
32 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqxtnb.nxv2i64(<vscale x 2 x i64> %a)
33 ret <vscale x 4 x i32> %out
40 define <vscale x 16 x i8> @uqxtnb_h(<vscale x 8 x i16> %a) {
41 ; CHECK-LABEL: uqxtnb_h:
43 ; CHECK-NEXT: uqxtnb z0.b, z0.h
45 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.uqxtnb.nxv8i16(<vscale x 8 x i16> %a)
46 ret <vscale x 16 x i8> %out
49 define <vscale x 8 x i16> @uqxtnb_s(<vscale x 4 x i32> %a) {
50 ; CHECK-LABEL: uqxtnb_s:
52 ; CHECK-NEXT: uqxtnb z0.h, z0.s
54 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.uqxtnb.nxv4i32(<vscale x 4 x i32> %a)
55 ret <vscale x 8 x i16> %out
58 define <vscale x 4 x i32> @uqxtnb_d(<vscale x 2 x i64> %a) {
59 ; CHECK-LABEL: uqxtnb_d:
61 ; CHECK-NEXT: uqxtnb z0.s, z0.d
63 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uqxtnb.nxv2i64(<vscale x 2 x i64> %a)
64 ret <vscale x 4 x i32> %out
71 define <vscale x 16 x i8> @sqxtunb_h(<vscale x 8 x i16> %a) {
72 ; CHECK-LABEL: sqxtunb_h:
74 ; CHECK-NEXT: sqxtunb z0.b, z0.h
76 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sqxtunb.nxv8i16(<vscale x 8 x i16> %a)
77 ret <vscale x 16 x i8> %out
80 define <vscale x 8 x i16> @sqxtunb_s(<vscale x 4 x i32> %a) {
81 ; CHECK-LABEL: sqxtunb_s:
83 ; CHECK-NEXT: sqxtunb z0.h, z0.s
85 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqxtunb.nxv4i32(<vscale x 4 x i32> %a)
86 ret <vscale x 8 x i16> %out
89 define <vscale x 4 x i32> @sqxtunb_d(<vscale x 2 x i64> %a) {
90 ; CHECK-LABEL: sqxtunb_d:
92 ; CHECK-NEXT: sqxtunb z0.s, z0.d
94 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqxtunb.nxv2i64(<vscale x 2 x i64> %a)
95 ret <vscale x 4 x i32> %out
102 define <vscale x 16 x i8> @sqxtnt_h(<vscale x 16 x i8> %a, <vscale x 8 x i16> %b) {
103 ; CHECK-LABEL: sqxtnt_h:
105 ; CHECK-NEXT: sqxtnt z0.b, z1.h
107 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sqxtnt.nxv8i16(<vscale x 16 x i8> %a,
108 <vscale x 8 x i16> %b)
109 ret <vscale x 16 x i8> %out
112 define <vscale x 8 x i16> @sqxtnt_s(<vscale x 8 x i16> %a, <vscale x 4 x i32> %b) {
113 ; CHECK-LABEL: sqxtnt_s:
115 ; CHECK-NEXT: sqxtnt z0.h, z1.s
117 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqxtnt.nxv4i32(<vscale x 8 x i16> %a,
118 <vscale x 4 x i32> %b)
119 ret <vscale x 8 x i16> %out
122 define <vscale x 4 x i32> @sqxtnt_d(<vscale x 4 x i32> %a, <vscale x 2 x i64> %b) {
123 ; CHECK-LABEL: sqxtnt_d:
125 ; CHECK-NEXT: sqxtnt z0.s, z1.d
127 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqxtnt.nxv2i64(<vscale x 4 x i32> %a,
128 <vscale x 2 x i64> %b)
129 ret <vscale x 4 x i32> %out
136 define <vscale x 16 x i8> @uqxtnt_h(<vscale x 16 x i8> %a, <vscale x 8 x i16> %b) {
137 ; CHECK-LABEL: uqxtnt_h:
139 ; CHECK-NEXT: uqxtnt z0.b, z1.h
141 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.uqxtnt.nxv8i16(<vscale x 16 x i8> %a,
142 <vscale x 8 x i16> %b)
143 ret <vscale x 16 x i8> %out
146 define <vscale x 8 x i16> @uqxtnt_s(<vscale x 8 x i16> %a, <vscale x 4 x i32> %b) {
147 ; CHECK-LABEL: uqxtnt_s:
149 ; CHECK-NEXT: uqxtnt z0.h, z1.s
151 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.uqxtnt.nxv4i32(<vscale x 8 x i16> %a,
152 <vscale x 4 x i32> %b)
153 ret <vscale x 8 x i16> %out
156 define <vscale x 4 x i32> @uqxtnt_d(<vscale x 4 x i32> %a, <vscale x 2 x i64> %b) {
157 ; CHECK-LABEL: uqxtnt_d:
159 ; CHECK-NEXT: uqxtnt z0.s, z1.d
161 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uqxtnt.nxv2i64(<vscale x 4 x i32> %a,
162 <vscale x 2 x i64> %b)
163 ret <vscale x 4 x i32> %out
170 define <vscale x 16 x i8> @sqxtunt_h(<vscale x 16 x i8> %a, <vscale x 8 x i16> %b) {
171 ; CHECK-LABEL: sqxtunt_h:
173 ; CHECK-NEXT: sqxtunt z0.b, z1.h
175 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sqxtunt.nxv8i16(<vscale x 16 x i8> %a,
176 <vscale x 8 x i16> %b)
177 ret <vscale x 16 x i8> %out
180 define <vscale x 8 x i16> @sqxtunt_s(<vscale x 8 x i16> %a, <vscale x 4 x i32> %b) {
181 ; CHECK-LABEL: sqxtunt_s:
183 ; CHECK-NEXT: sqxtunt z0.h, z1.s
185 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqxtunt.nxv4i32(<vscale x 8 x i16> %a,
186 <vscale x 4 x i32> %b)
187 ret <vscale x 8 x i16> %out
190 define <vscale x 4 x i32> @sqxtunt_d(<vscale x 4 x i32> %a, <vscale x 2 x i64> %b) {
191 ; CHECK-LABEL: sqxtunt_d:
193 ; CHECK-NEXT: sqxtunt z0.s, z1.d
195 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqxtunt.nxv2i64(<vscale x 4 x i32> %a,
196 <vscale x 2 x i64> %b)
197 ret <vscale x 4 x i32> %out
200 declare <vscale x 16 x i8> @llvm.aarch64.sve.sqxtnb.nxv8i16(<vscale x 8 x i16>)
201 declare <vscale x 8 x i16> @llvm.aarch64.sve.sqxtnb.nxv4i32(<vscale x 4 x i32>)
202 declare <vscale x 4 x i32> @llvm.aarch64.sve.sqxtnb.nxv2i64(<vscale x 2 x i64>)
204 declare <vscale x 16 x i8> @llvm.aarch64.sve.uqxtnb.nxv8i16(<vscale x 8 x i16>)
205 declare <vscale x 8 x i16> @llvm.aarch64.sve.uqxtnb.nxv4i32(<vscale x 4 x i32>)
206 declare <vscale x 4 x i32> @llvm.aarch64.sve.uqxtnb.nxv2i64(<vscale x 2 x i64>)
208 declare <vscale x 16 x i8> @llvm.aarch64.sve.sqxtunb.nxv8i16(<vscale x 8 x i16>)
209 declare <vscale x 8 x i16> @llvm.aarch64.sve.sqxtunb.nxv4i32(<vscale x 4 x i32>)
210 declare <vscale x 4 x i32> @llvm.aarch64.sve.sqxtunb.nxv2i64(<vscale x 2 x i64>)
212 declare <vscale x 16 x i8> @llvm.aarch64.sve.sqxtnt.nxv8i16(<vscale x 16 x i8>, <vscale x 8 x i16>)
213 declare <vscale x 8 x i16> @llvm.aarch64.sve.sqxtnt.nxv4i32(<vscale x 8 x i16>, <vscale x 4 x i32>)
214 declare <vscale x 4 x i32> @llvm.aarch64.sve.sqxtnt.nxv2i64(<vscale x 4 x i32>, <vscale x 2 x i64>)
216 declare <vscale x 16 x i8> @llvm.aarch64.sve.uqxtnt.nxv8i16(<vscale x 16 x i8>, <vscale x 8 x i16>)
217 declare <vscale x 8 x i16> @llvm.aarch64.sve.uqxtnt.nxv4i32(<vscale x 8 x i16>, <vscale x 4 x i32>)
218 declare <vscale x 4 x i32> @llvm.aarch64.sve.uqxtnt.nxv2i64(<vscale x 4 x i32>, <vscale x 2 x i64>)
220 declare <vscale x 16 x i8> @llvm.aarch64.sve.sqxtunt.nxv8i16(<vscale x 16 x i8>, <vscale x 8 x i16>)
221 declare <vscale x 8 x i16> @llvm.aarch64.sve.sqxtunt.nxv4i32(<vscale x 8 x i16>, <vscale x 4 x i32>)
222 declare <vscale x 4 x i32> @llvm.aarch64.sve.sqxtunt.nxv2i64(<vscale x 4 x i32>, <vscale x 2 x i64>)