1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2 < %s | FileCheck %s
7 define <vscale x 16 x i8> @cadd_b(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
9 ; CHECK: cadd z0.b, z0.b, z1.b, #90
11 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.cadd.x.nxv16i8(<vscale x 16 x i8> %a,
12 <vscale x 16 x i8> %b,
14 ret <vscale x 16 x i8> %out
17 define <vscale x 8 x i16> @cadd_h(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
18 ; CHECK-LABEL: cadd_h:
19 ; CHECK: cadd z0.h, z0.h, z1.h, #90
21 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.cadd.x.nxv8i16(<vscale x 8 x i16> %a,
22 <vscale x 8 x i16> %b,
24 ret <vscale x 8 x i16> %out
27 define <vscale x 4 x i32> @cadd_s(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
28 ; CHECK-LABEL: cadd_s:
29 ; CHECK: cadd z0.s, z0.s, z1.s, #270
31 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.cadd.x.nxv4i32(<vscale x 4 x i32> %a,
32 <vscale x 4 x i32> %b,
34 ret <vscale x 4 x i32> %out
37 define <vscale x 2 x i64> @cadd_d(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
38 ; CHECK-LABEL: cadd_d:
39 ; CHECK: cadd z0.d, z0.d, z1.d, #270
41 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.cadd.x.nxv2i64(<vscale x 2 x i64> %a,
42 <vscale x 2 x i64> %b,
44 ret <vscale x 2 x i64> %out
51 define <vscale x 16 x i8> @sqcadd_b(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
52 ; CHECK-LABEL: sqcadd_b:
53 ; CHECK: sqcadd z0.b, z0.b, z1.b, #90
55 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sqcadd.x.nxv16i8(<vscale x 16 x i8> %a,
56 <vscale x 16 x i8> %b,
58 ret <vscale x 16 x i8> %out
61 define <vscale x 8 x i16> @sqcadd_h(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
62 ; CHECK-LABEL: sqcadd_h:
63 ; CHECK: sqcadd z0.h, z0.h, z1.h, #90
65 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqcadd.x.nxv8i16(<vscale x 8 x i16> %a,
66 <vscale x 8 x i16> %b,
68 ret <vscale x 8 x i16> %out
71 define <vscale x 4 x i32> @sqcadd_s(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
72 ; CHECK-LABEL: sqcadd_s:
73 ; CHECK: sqcadd z0.s, z0.s, z1.s, #270
75 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqcadd.x.nxv4i32(<vscale x 4 x i32> %a,
76 <vscale x 4 x i32> %b,
78 ret <vscale x 4 x i32> %out
81 define <vscale x 2 x i64> @sqcadd_d(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
82 ; CHECK-LABEL: sqcadd_d:
83 ; CHECK: sqcadd z0.d, z0.d, z1.d, #270
85 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sqcadd.x.nxv2i64(<vscale x 2 x i64> %a,
86 <vscale x 2 x i64> %b,
88 ret <vscale x 2 x i64> %out
95 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) {
96 ; CHECK-LABEL: cmla_b:
97 ; CHECK: cmla z0.b, z1.b, z2.b, #90
99 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.cmla.x.nxv16i8(<vscale x 16 x i8> %a,
100 <vscale x 16 x i8> %b,
101 <vscale x 16 x i8> %c,
103 ret <vscale x 16 x i8> %out
106 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) {
107 ; CHECK-LABEL: cmla_h:
108 ; CHECK: cmla z0.h, z1.h, z2.h, #180
110 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.cmla.x.nxv8i16(<vscale x 8 x i16> %a,
111 <vscale x 8 x i16> %b,
112 <vscale x 8 x i16> %c,
114 ret <vscale x 8 x i16> %out
117 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) {
118 ; CHECK-LABEL: cmla_s:
119 ; CHECK: cmla z0.s, z1.s, z2.s, #270
121 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.cmla.x.nxv4i32(<vscale x 4 x i32> %a,
122 <vscale x 4 x i32> %b,
123 <vscale x 4 x i32> %c,
125 ret <vscale x 4 x i32> %out
128 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) {
129 ; CHECK-LABEL: cmla_d:
130 ; CHECK: cmla z0.d, z1.d, z2.d, #0
132 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.cmla.x.nxv2i64(<vscale x 2 x i64> %a,
133 <vscale x 2 x i64> %b,
134 <vscale x 2 x i64> %c,
136 ret <vscale x 2 x i64> %out
143 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) {
144 ; CHECK-LABEL: cmla_lane_h:
145 ; CHECK: cmla z0.h, z1.h, z2.h[1], #180
147 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.cmla.lane.x.nxv8i16(<vscale x 8 x i16> %a,
148 <vscale x 8 x i16> %b,
149 <vscale x 8 x i16> %c,
152 ret <vscale x 8 x i16> %out
155 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) {
156 ; CHECK-LABEL: cmla_lane_s:
157 ; CHECK: cmla z0.s, z1.s, z2.s[0], #270
159 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.cmla.lane.x.nxv4i32(<vscale x 4 x i32> %a,
160 <vscale x 4 x i32> %b,
161 <vscale x 4 x i32> %c,
164 ret <vscale x 4 x i32> %out
171 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) {
172 ; CHECK-LABEL: sqrdcmlah_b:
173 ; CHECK: sqrdcmlah z0.b, z1.b, z2.b, #0
175 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sqrdcmlah.x.nxv16i8(<vscale x 16 x i8> %a,
176 <vscale x 16 x i8> %b,
177 <vscale x 16 x i8> %c,
179 ret <vscale x 16 x i8> %out
182 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) {
183 ; CHECK-LABEL: sqrdcmlah_h:
184 ; CHECK: sqrdcmlah z0.h, z1.h, z2.h, #90
186 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqrdcmlah.x.nxv8i16(<vscale x 8 x i16> %a,
187 <vscale x 8 x i16> %b,
188 <vscale x 8 x i16> %c,
190 ret <vscale x 8 x i16> %out
193 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) {
194 ; CHECK-LABEL: sqrdcmlah_s:
195 ; CHECK: sqrdcmlah z0.s, z1.s, z2.s, #180
197 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqrdcmlah.x.nxv4i32(<vscale x 4 x i32> %a,
198 <vscale x 4 x i32> %b,
199 <vscale x 4 x i32> %c,
201 ret <vscale x 4 x i32> %out
204 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) {
205 ; CHECK-LABEL: sqrdcmlah_d:
206 ; CHECK: sqrdcmlah z0.d, z1.d, z2.d, #270
208 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sqrdcmlah.x.nxv2i64(<vscale x 2 x i64> %a,
209 <vscale x 2 x i64> %b,
210 <vscale x 2 x i64> %c,
212 ret <vscale x 2 x i64> %out
219 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) {
220 ; CHECK-LABEL: sqrdcmlah_lane_h:
221 ; CHECK: sqrdcmlah z0.h, z1.h, z2.h[1], #90
223 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv8i16(<vscale x 8 x i16> %a,
224 <vscale x 8 x i16> %b,
225 <vscale x 8 x i16> %c,
228 ret <vscale x 8 x i16> %out
231 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) {
232 ; CHECK-LABEL: sqrdcmlah_lane_s:
233 ; CHECK: sqrdcmlah z0.s, z1.s, z2.s[0], #180
235 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv4i32(<vscale x 4 x i32> %a,
236 <vscale x 4 x i32> %b,
237 <vscale x 4 x i32> %c,
240 ret <vscale x 4 x i32> %out
243 declare <vscale x 16 x i8> @llvm.aarch64.sve.cadd.x.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, i32)
244 declare <vscale x 8 x i16> @llvm.aarch64.sve.cadd.x.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, i32)
245 declare <vscale x 4 x i32> @llvm.aarch64.sve.cadd.x.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, i32)
246 declare <vscale x 2 x i64> @llvm.aarch64.sve.cadd.x.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, i32)
248 declare <vscale x 16 x i8> @llvm.aarch64.sve.sqcadd.x.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, i32)
249 declare <vscale x 8 x i16> @llvm.aarch64.sve.sqcadd.x.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, i32)
250 declare <vscale x 4 x i32> @llvm.aarch64.sve.sqcadd.x.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, i32)
251 declare <vscale x 2 x i64> @llvm.aarch64.sve.sqcadd.x.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, i32)
253 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)
254 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)
255 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)
256 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)
258 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)
259 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)
261 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)
262 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)
263 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)
264 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)
266 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)
267 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)