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> @cadd_b(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
10 ; CHECK-LABEL: cadd_b:
12 ; CHECK-NEXT: cadd z0.b, z0.b, z1.b, #90
14 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.cadd.x.nxv16i8(<vscale x 16 x i8> %a,
15 <vscale x 16 x i8> %b,
17 ret <vscale x 16 x i8> %out
20 define <vscale x 8 x i16> @cadd_h(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
21 ; CHECK-LABEL: cadd_h:
23 ; CHECK-NEXT: cadd z0.h, z0.h, z1.h, #90
25 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.cadd.x.nxv8i16(<vscale x 8 x i16> %a,
26 <vscale x 8 x i16> %b,
28 ret <vscale x 8 x i16> %out
31 define <vscale x 4 x i32> @cadd_s(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
32 ; CHECK-LABEL: cadd_s:
34 ; CHECK-NEXT: cadd z0.s, z0.s, z1.s, #270
36 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.cadd.x.nxv4i32(<vscale x 4 x i32> %a,
37 <vscale x 4 x i32> %b,
39 ret <vscale x 4 x i32> %out
42 define <vscale x 2 x i64> @cadd_d(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
43 ; CHECK-LABEL: cadd_d:
45 ; CHECK-NEXT: cadd z0.d, z0.d, z1.d, #270
47 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.cadd.x.nxv2i64(<vscale x 2 x i64> %a,
48 <vscale x 2 x i64> %b,
50 ret <vscale x 2 x i64> %out
57 define <vscale x 16 x i8> @sqcadd_b(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
58 ; CHECK-LABEL: sqcadd_b:
60 ; CHECK-NEXT: sqcadd z0.b, z0.b, z1.b, #90
62 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sqcadd.x.nxv16i8(<vscale x 16 x i8> %a,
63 <vscale x 16 x i8> %b,
65 ret <vscale x 16 x i8> %out
68 define <vscale x 8 x i16> @sqcadd_h(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
69 ; CHECK-LABEL: sqcadd_h:
71 ; CHECK-NEXT: sqcadd z0.h, z0.h, z1.h, #90
73 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqcadd.x.nxv8i16(<vscale x 8 x i16> %a,
74 <vscale x 8 x i16> %b,
76 ret <vscale x 8 x i16> %out
79 define <vscale x 4 x i32> @sqcadd_s(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
80 ; CHECK-LABEL: sqcadd_s:
82 ; CHECK-NEXT: sqcadd z0.s, z0.s, z1.s, #270
84 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqcadd.x.nxv4i32(<vscale x 4 x i32> %a,
85 <vscale x 4 x i32> %b,
87 ret <vscale x 4 x i32> %out
90 define <vscale x 2 x i64> @sqcadd_d(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
91 ; CHECK-LABEL: sqcadd_d:
93 ; CHECK-NEXT: sqcadd z0.d, z0.d, z1.d, #270
95 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sqcadd.x.nxv2i64(<vscale x 2 x i64> %a,
96 <vscale x 2 x i64> %b,
98 ret <vscale x 2 x i64> %out
105 define <vscale x 16 x i8> @cmla_b(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c) {
106 ; CHECK-LABEL: cmla_b:
108 ; CHECK-NEXT: cmla z0.b, z1.b, z2.b, #90
110 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.cmla.x.nxv16i8(<vscale x 16 x i8> %a,
111 <vscale x 16 x i8> %b,
112 <vscale x 16 x i8> %c,
114 ret <vscale x 16 x i8> %out
117 define <vscale x 8 x i16> @cmla_h(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b, <vscale x 8 x i16> %c) {
118 ; CHECK-LABEL: cmla_h:
120 ; CHECK-NEXT: cmla z0.h, z1.h, z2.h, #180
122 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.cmla.x.nxv8i16(<vscale x 8 x i16> %a,
123 <vscale x 8 x i16> %b,
124 <vscale x 8 x i16> %c,
126 ret <vscale x 8 x i16> %out
129 define <vscale x 4 x i32> @cmla_s(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c) {
130 ; CHECK-LABEL: cmla_s:
132 ; CHECK-NEXT: cmla z0.s, z1.s, z2.s, #270
134 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.cmla.x.nxv4i32(<vscale x 4 x i32> %a,
135 <vscale x 4 x i32> %b,
136 <vscale x 4 x i32> %c,
138 ret <vscale x 4 x i32> %out
141 define <vscale x 2 x i64> @cmla_d(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b, <vscale x 2 x i64> %c) {
142 ; CHECK-LABEL: cmla_d:
144 ; CHECK-NEXT: cmla z0.d, z1.d, z2.d, #0
146 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.cmla.x.nxv2i64(<vscale x 2 x i64> %a,
147 <vscale x 2 x i64> %b,
148 <vscale x 2 x i64> %c,
150 ret <vscale x 2 x i64> %out
157 define <vscale x 8 x i16> @cmla_lane_h(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b, <vscale x 8 x i16> %c) {
158 ; CHECK-LABEL: cmla_lane_h:
160 ; CHECK-NEXT: cmla z0.h, z1.h, z2.h[1], #180
162 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.cmla.lane.x.nxv8i16(<vscale x 8 x i16> %a,
163 <vscale x 8 x i16> %b,
164 <vscale x 8 x i16> %c,
167 ret <vscale x 8 x i16> %out
170 define <vscale x 4 x i32> @cmla_lane_s(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c) {
171 ; CHECK-LABEL: cmla_lane_s:
173 ; CHECK-NEXT: cmla z0.s, z1.s, z2.s[0], #270
175 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.cmla.lane.x.nxv4i32(<vscale x 4 x i32> %a,
176 <vscale x 4 x i32> %b,
177 <vscale x 4 x i32> %c,
180 ret <vscale x 4 x i32> %out
187 define <vscale x 16 x i8> @sqrdcmlah_b(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c) {
188 ; CHECK-LABEL: sqrdcmlah_b:
190 ; CHECK-NEXT: sqrdcmlah z0.b, z1.b, z2.b, #0
192 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sqrdcmlah.x.nxv16i8(<vscale x 16 x i8> %a,
193 <vscale x 16 x i8> %b,
194 <vscale x 16 x i8> %c,
196 ret <vscale x 16 x i8> %out
199 define <vscale x 8 x i16> @sqrdcmlah_h(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b, <vscale x 8 x i16> %c) {
200 ; CHECK-LABEL: sqrdcmlah_h:
202 ; CHECK-NEXT: sqrdcmlah z0.h, z1.h, z2.h, #90
204 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqrdcmlah.x.nxv8i16(<vscale x 8 x i16> %a,
205 <vscale x 8 x i16> %b,
206 <vscale x 8 x i16> %c,
208 ret <vscale x 8 x i16> %out
211 define <vscale x 4 x i32> @sqrdcmlah_s(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c) {
212 ; CHECK-LABEL: sqrdcmlah_s:
214 ; CHECK-NEXT: sqrdcmlah z0.s, z1.s, z2.s, #180
216 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqrdcmlah.x.nxv4i32(<vscale x 4 x i32> %a,
217 <vscale x 4 x i32> %b,
218 <vscale x 4 x i32> %c,
220 ret <vscale x 4 x i32> %out
223 define <vscale x 2 x i64> @sqrdcmlah_d(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b, <vscale x 2 x i64> %c) {
224 ; CHECK-LABEL: sqrdcmlah_d:
226 ; CHECK-NEXT: sqrdcmlah z0.d, z1.d, z2.d, #270
228 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sqrdcmlah.x.nxv2i64(<vscale x 2 x i64> %a,
229 <vscale x 2 x i64> %b,
230 <vscale x 2 x i64> %c,
232 ret <vscale x 2 x i64> %out
239 define <vscale x 8 x i16> @sqrdcmlah_lane_h(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b, <vscale x 8 x i16> %c) {
240 ; CHECK-LABEL: sqrdcmlah_lane_h:
242 ; CHECK-NEXT: sqrdcmlah z0.h, z1.h, z2.h[1], #90
244 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv8i16(<vscale x 8 x i16> %a,
245 <vscale x 8 x i16> %b,
246 <vscale x 8 x i16> %c,
249 ret <vscale x 8 x i16> %out
252 define <vscale x 4 x i32> @sqrdcmlah_lane_s(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c) {
253 ; CHECK-LABEL: sqrdcmlah_lane_s:
255 ; CHECK-NEXT: sqrdcmlah z0.s, z1.s, z2.s[0], #180
257 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv4i32(<vscale x 4 x i32> %a,
258 <vscale x 4 x i32> %b,
259 <vscale x 4 x i32> %c,
262 ret <vscale x 4 x i32> %out
265 declare <vscale x 16 x i8> @llvm.aarch64.sve.cadd.x.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, i32)
266 declare <vscale x 8 x i16> @llvm.aarch64.sve.cadd.x.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, i32)
267 declare <vscale x 4 x i32> @llvm.aarch64.sve.cadd.x.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, i32)
268 declare <vscale x 2 x i64> @llvm.aarch64.sve.cadd.x.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, i32)
270 declare <vscale x 16 x i8> @llvm.aarch64.sve.sqcadd.x.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, i32)
271 declare <vscale x 8 x i16> @llvm.aarch64.sve.sqcadd.x.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, i32)
272 declare <vscale x 4 x i32> @llvm.aarch64.sve.sqcadd.x.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, i32)
273 declare <vscale x 2 x i64> @llvm.aarch64.sve.sqcadd.x.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, i32)
275 declare <vscale x 16 x i8> @llvm.aarch64.sve.cmla.x.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, i32)
276 declare <vscale x 8 x i16> @llvm.aarch64.sve.cmla.x.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, i32)
277 declare <vscale x 4 x i32> @llvm.aarch64.sve.cmla.x.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, i32)
278 declare <vscale x 2 x i64> @llvm.aarch64.sve.cmla.x.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, i32)
280 declare <vscale x 8 x i16> @llvm.aarch64.sve.cmla.lane.x.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, i32, i32)
281 declare <vscale x 4 x i32> @llvm.aarch64.sve.cmla.lane.x.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, i32, i32)
283 declare <vscale x 16 x i8> @llvm.aarch64.sve.sqrdcmlah.x.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, i32)
284 declare <vscale x 8 x i16> @llvm.aarch64.sve.sqrdcmlah.x.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, i32)
285 declare <vscale x 4 x i32> @llvm.aarch64.sve.sqrdcmlah.x.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, i32)
286 declare <vscale x 2 x i64> @llvm.aarch64.sve.sqrdcmlah.x.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, i32)
288 declare <vscale x 8 x i16> @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, i32, i32)
289 declare <vscale x 4 x i32> @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, i32, i32)