1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -asm-verbose=0 < %s | FileCheck %s
3 ; Since UQDEC{B|H|W|D|P} and UQINC{B|H|W|D|P} have identical semantics, the tests for
4 ; * @llvm.aarch64.sve.uqinc{b|h|w|d|p}, and
5 ; * @llvm.aarch64.sve.uqdec{b|h|w|d|p}
6 ; should also be identical (with the instruction name being adjusted). When
7 ; updating this file remember to make similar changes in the file testing the
14 define <vscale x 8 x i16> @uqinch(<vscale x 8 x i16> %a) {
15 ; CHECK-LABEL: uqinch:
16 ; CHECK: uqinch z0.h, pow2
18 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.uqinch.nxv8i16(<vscale x 8 x i16> %a,
20 ret <vscale x 8 x i16> %out
27 define <vscale x 4 x i32> @uqincw(<vscale x 4 x i32> %a) {
28 ; CHECK-LABEL: uqincw:
29 ; CHECK: uqincw z0.s, vl1, mul #2
31 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uqincw.nxv4i32(<vscale x 4 x i32> %a,
33 ret <vscale x 4 x i32> %out
40 define <vscale x 2 x i64> @uqincd(<vscale x 2 x i64> %a) {
41 ; CHECK-LABEL: uqincd:
42 ; CHECK: uqincd z0.d, vl2, mul #3
44 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.uqincd.nxv2i64(<vscale x 2 x i64> %a,
46 ret <vscale x 2 x i64> %out
53 define <vscale x 8 x i16> @uqincp_b16(<vscale x 8 x i16> %a, <vscale x 8 x i1> %b) {
54 ; CHECK-LABEL: uqincp_b16:
55 ; CHECK: uqincp z0.h, p0
57 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.uqincp.nxv8i16(<vscale x 8 x i16> %a,
59 ret <vscale x 8 x i16> %out
62 define <vscale x 4 x i32> @uqincp_b32(<vscale x 4 x i32> %a, <vscale x 4 x i1> %b) {
63 ; CHECK-LABEL: uqincp_b32:
64 ; CHECK: uqincp z0.s, p0
66 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uqincp.nxv4i32(<vscale x 4 x i32> %a,
68 ret <vscale x 4 x i32> %out
71 define <vscale x 2 x i64> @uqincp_b64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %b) {
72 ; CHECK-LABEL: uqincp_b64:
73 ; CHECK: uqincp z0.d, p0
75 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.uqincp.nxv2i64(<vscale x 2 x i64> %a,
77 ret <vscale x 2 x i64> %out
84 define i32 @uqincb_n32(i32 %a) {
85 ; CHECK-LABEL: uqincb_n32:
86 ; CHECK: uqincb w0, vl3, mul #4
88 %out = call i32 @llvm.aarch64.sve.uqincb.n32(i32 %a, i32 3, i32 4)
92 define i64 @uqincb_n64(i64 %a) {
93 ; CHECK-LABEL: uqincb_n64:
94 ; CHECK: uqincb x0, vl4, mul #5
96 %out = call i64 @llvm.aarch64.sve.uqincb.n64(i64 %a, i32 4, i32 5)
104 define i32 @uqinch_n32(i32 %a) {
105 ; CHECK-LABEL: uqinch_n32:
106 ; CHECK: uqinch w0, vl5, mul #6
108 %out = call i32 @llvm.aarch64.sve.uqinch.n32(i32 %a, i32 5, i32 6)
112 define i64 @uqinch_n64(i64 %a) {
113 ; CHECK-LABEL: uqinch_n64:
114 ; CHECK: uqinch x0, vl6, mul #7
116 %out = call i64 @llvm.aarch64.sve.uqinch.n64(i64 %a, i32 6, i32 7)
124 define i32 @uqincw_n32(i32 %a) {
125 ; CHECK-LABEL: uqincw_n32:
126 ; CHECK: uqincw w0, vl7, mul #8
128 %out = call i32 @llvm.aarch64.sve.uqincw.n32(i32 %a, i32 7, i32 8)
132 define i64 @uqincw_n64(i64 %a) {
133 ; CHECK-LABEL: uqincw_n64:
134 ; CHECK: uqincw x0, vl8, mul #9
136 %out = call i64 @llvm.aarch64.sve.uqincw.n64(i64 %a, i32 8, i32 9)
144 define i32 @uqincd_n32(i32 %a) {
145 ; CHECK-LABEL: uqincd_n32:
146 ; CHECK: uqincd w0, vl16, mul #10
148 %out = call i32 @llvm.aarch64.sve.uqincd.n32(i32 %a, i32 9, i32 10)
152 define i64 @uqincd_n64(i64 %a) {
153 ; CHECK-LABEL: uqincd_n64:
154 ; CHECK: uqincd x0, vl32, mul #11
156 %out = call i64 @llvm.aarch64.sve.uqincd.n64(i64 %a, i32 10, i32 11)
164 define i32 @uqincp_n32_b8(i32 %a, <vscale x 16 x i1> %b) {
165 ; CHECK-LABEL: uqincp_n32_b8:
166 ; CHECK: uqincp w0, p0.b
168 %out = call i32 @llvm.aarch64.sve.uqincp.n32.nxv16i1(i32 %a, <vscale x 16 x i1> %b)
172 define i32 @uqincp_n32_b16(i32 %a, <vscale x 8 x i1> %b) {
173 ; CHECK-LABEL: uqincp_n32_b16:
174 ; CHECK: uqincp w0, p0.h
176 %out = call i32 @llvm.aarch64.sve.uqincp.n32.nxv8i1(i32 %a, <vscale x 8 x i1> %b)
180 define i32 @uqincp_n32_b32(i32 %a, <vscale x 4 x i1> %b) {
181 ; CHECK-LABEL: uqincp_n32_b32:
182 ; CHECK: uqincp w0, p0.s
184 %out = call i32 @llvm.aarch64.sve.uqincp.n32.nxv4i1(i32 %a, <vscale x 4 x i1> %b)
188 define i32 @uqincp_n32_b64(i32 %a, <vscale x 2 x i1> %b) {
189 ; CHECK-LABEL: uqincp_n32_b64:
190 ; CHECK: uqincp w0, p0.d
192 %out = call i32 @llvm.aarch64.sve.uqincp.n32.nxv2i1(i32 %a, <vscale x 2 x i1> %b)
196 define i64 @uqincp_n64_b8(i64 %a, <vscale x 16 x i1> %b) {
197 ; CHECK-LABEL: uqincp_n64_b8:
198 ; CHECK: uqincp x0, p0.b
200 %out = call i64 @llvm.aarch64.sve.uqincp.n64.nxv16i1(i64 %a, <vscale x 16 x i1> %b)
204 define i64 @uqincp_n64_b16(i64 %a, <vscale x 8 x i1> %b) {
205 ; CHECK-LABEL: uqincp_n64_b16:
206 ; CHECK: uqincp x0, p0.h
208 %out = call i64 @llvm.aarch64.sve.uqincp.n64.nxv8i1(i64 %a, <vscale x 8 x i1> %b)
212 define i64 @uqincp_n64_b32(i64 %a, <vscale x 4 x i1> %b) {
213 ; CHECK-LABEL: uqincp_n64_b32:
214 ; CHECK: uqincp x0, p0.s
216 %out = call i64 @llvm.aarch64.sve.uqincp.n64.nxv4i1(i64 %a, <vscale x 4 x i1> %b)
220 define i64 @uqincp_n64_b64(i64 %a, <vscale x 2 x i1> %b) {
221 ; CHECK-LABEL: uqincp_n64_b64:
222 ; CHECK: uqincp x0, p0.d
224 %out = call i64 @llvm.aarch64.sve.uqincp.n64.nxv2i1(i64 %a, <vscale x 2 x i1> %b)
228 ; uqinc{h|w|d}(vector, pattern, multiplier)
229 declare <vscale x 8 x i16> @llvm.aarch64.sve.uqinch.nxv8i16(<vscale x 8 x i16>, i32, i32)
230 declare <vscale x 4 x i32> @llvm.aarch64.sve.uqincw.nxv4i32(<vscale x 4 x i32>, i32, i32)
231 declare <vscale x 2 x i64> @llvm.aarch64.sve.uqincd.nxv2i64(<vscale x 2 x i64>, i32, i32)
233 ; uqinc{b|h|w|d}(scalar, pattern, multiplier)
234 declare i32 @llvm.aarch64.sve.uqincb.n32(i32, i32, i32)
235 declare i64 @llvm.aarch64.sve.uqincb.n64(i64, i32, i32)
236 declare i32 @llvm.aarch64.sve.uqinch.n32(i32, i32, i32)
237 declare i64 @llvm.aarch64.sve.uqinch.n64(i64, i32, i32)
238 declare i32 @llvm.aarch64.sve.uqincw.n32(i32, i32, i32)
239 declare i64 @llvm.aarch64.sve.uqincw.n64(i64, i32, i32)
240 declare i32 @llvm.aarch64.sve.uqincd.n32(i32, i32, i32)
241 declare i64 @llvm.aarch64.sve.uqincd.n64(i64, i32, i32)
243 ; uqincp(scalar, predicate)
244 declare i32 @llvm.aarch64.sve.uqincp.n32.nxv16i1(i32, <vscale x 16 x i1>)
245 declare i32 @llvm.aarch64.sve.uqincp.n32.nxv8i1(i32, <vscale x 8 x i1>)
246 declare i32 @llvm.aarch64.sve.uqincp.n32.nxv4i1(i32, <vscale x 4 x i1>)
247 declare i32 @llvm.aarch64.sve.uqincp.n32.nxv2i1(i32, <vscale x 2 x i1>)
249 declare i64 @llvm.aarch64.sve.uqincp.n64.nxv16i1(i64, <vscale x 16 x i1>)
250 declare i64 @llvm.aarch64.sve.uqincp.n64.nxv8i1(i64, <vscale x 8 x i1>)
251 declare i64 @llvm.aarch64.sve.uqincp.n64.nxv4i1(i64, <vscale x 4 x i1>)
252 declare i64 @llvm.aarch64.sve.uqincp.n64.nxv2i1(i64, <vscale x 2 x i1>)
254 ; uqincp(vector, predicate)
255 declare <vscale x 8 x i16> @llvm.aarch64.sve.uqincp.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i1>)
256 declare <vscale x 4 x i32> @llvm.aarch64.sve.uqincp.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>)
257 declare <vscale x 2 x i64> @llvm.aarch64.sve.uqincp.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>)