1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
3 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme < %s | FileCheck %s
5 ; Since UQDEC{B|H|W|D|P} and UQINC{B|H|W|D|P} have identical semantics, the tests for
6 ; * @llvm.aarch64.sve.uqinc{b|h|w|d|p}, and
7 ; * @llvm.aarch64.sve.uqdec{b|h|w|d|p}
8 ; should also be identical (with the instruction name being adjusted). When
9 ; updating this file remember to make similar changes in the file testing the
16 define <vscale x 8 x i16> @uqinch(<vscale x 8 x i16> %a) {
17 ; CHECK-LABEL: uqinch:
19 ; CHECK-NEXT: uqinch z0.h, pow2
21 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.uqinch.nxv8i16(<vscale x 8 x i16> %a,
23 ret <vscale x 8 x i16> %out
30 define <vscale x 4 x i32> @uqincw(<vscale x 4 x i32> %a) {
31 ; CHECK-LABEL: uqincw:
33 ; CHECK-NEXT: uqincw z0.s, vl1, mul #2
35 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uqincw.nxv4i32(<vscale x 4 x i32> %a,
37 ret <vscale x 4 x i32> %out
44 define <vscale x 2 x i64> @uqincd(<vscale x 2 x i64> %a) {
45 ; CHECK-LABEL: uqincd:
47 ; CHECK-NEXT: uqincd z0.d, vl2, mul #3
49 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.uqincd.nxv2i64(<vscale x 2 x i64> %a,
51 ret <vscale x 2 x i64> %out
58 define <vscale x 8 x i16> @uqincp_b16(<vscale x 8 x i16> %a, <vscale x 8 x i1> %b) {
59 ; CHECK-LABEL: uqincp_b16:
61 ; CHECK-NEXT: uqincp z0.h, p0.h
63 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.uqincp.nxv8i16(<vscale x 8 x i16> %a,
65 ret <vscale x 8 x i16> %out
68 define <vscale x 4 x i32> @uqincp_b32(<vscale x 4 x i32> %a, <vscale x 4 x i1> %b) {
69 ; CHECK-LABEL: uqincp_b32:
71 ; CHECK-NEXT: uqincp z0.s, p0.s
73 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uqincp.nxv4i32(<vscale x 4 x i32> %a,
75 ret <vscale x 4 x i32> %out
78 define <vscale x 2 x i64> @uqincp_b64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %b) {
79 ; CHECK-LABEL: uqincp_b64:
81 ; CHECK-NEXT: uqincp z0.d, p0.d
83 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.uqincp.nxv2i64(<vscale x 2 x i64> %a,
85 ret <vscale x 2 x i64> %out
92 define i32 @uqincb_n32(i32 %a) {
93 ; CHECK-LABEL: uqincb_n32:
95 ; CHECK-NEXT: uqincb w0, vl3, mul #4
97 %out = call i32 @llvm.aarch64.sve.uqincb.n32(i32 %a, i32 3, i32 4)
101 define i64 @uqincb_n64(i64 %a) {
102 ; CHECK-LABEL: uqincb_n64:
104 ; CHECK-NEXT: uqincb x0, vl4, mul #5
106 %out = call i64 @llvm.aarch64.sve.uqincb.n64(i64 %a, i32 4, i32 5)
114 define i32 @uqinch_n32(i32 %a) {
115 ; CHECK-LABEL: uqinch_n32:
117 ; CHECK-NEXT: uqinch w0, vl5, mul #6
119 %out = call i32 @llvm.aarch64.sve.uqinch.n32(i32 %a, i32 5, i32 6)
123 define i64 @uqinch_n64(i64 %a) {
124 ; CHECK-LABEL: uqinch_n64:
126 ; CHECK-NEXT: uqinch x0, vl6, mul #7
128 %out = call i64 @llvm.aarch64.sve.uqinch.n64(i64 %a, i32 6, i32 7)
136 define i32 @uqincw_n32(i32 %a) {
137 ; CHECK-LABEL: uqincw_n32:
139 ; CHECK-NEXT: uqincw w0, vl7, mul #8
141 %out = call i32 @llvm.aarch64.sve.uqincw.n32(i32 %a, i32 7, i32 8)
145 define i64 @uqincw_n64(i64 %a) {
146 ; CHECK-LABEL: uqincw_n64:
148 ; CHECK-NEXT: uqincw x0, vl8, mul #9
150 %out = call i64 @llvm.aarch64.sve.uqincw.n64(i64 %a, i32 8, i32 9)
158 define i32 @uqincd_n32(i32 %a) {
159 ; CHECK-LABEL: uqincd_n32:
161 ; CHECK-NEXT: uqincd w0, vl16, mul #10
163 %out = call i32 @llvm.aarch64.sve.uqincd.n32(i32 %a, i32 9, i32 10)
167 define i64 @uqincd_n64(i64 %a) {
168 ; CHECK-LABEL: uqincd_n64:
170 ; CHECK-NEXT: uqincd x0, vl32, mul #11
172 %out = call i64 @llvm.aarch64.sve.uqincd.n64(i64 %a, i32 10, i32 11)
180 define i32 @uqincp_n32_b8(i32 %a, <vscale x 16 x i1> %b) {
181 ; CHECK-LABEL: uqincp_n32_b8:
183 ; CHECK-NEXT: uqincp w0, p0.b
185 %out = call i32 @llvm.aarch64.sve.uqincp.n32.nxv16i1(i32 %a, <vscale x 16 x i1> %b)
189 define i32 @uqincp_n32_b16(i32 %a, <vscale x 8 x i1> %b) {
190 ; CHECK-LABEL: uqincp_n32_b16:
192 ; CHECK-NEXT: uqincp w0, p0.h
194 %out = call i32 @llvm.aarch64.sve.uqincp.n32.nxv8i1(i32 %a, <vscale x 8 x i1> %b)
198 define i32 @uqincp_n32_b32(i32 %a, <vscale x 4 x i1> %b) {
199 ; CHECK-LABEL: uqincp_n32_b32:
201 ; CHECK-NEXT: uqincp w0, p0.s
203 %out = call i32 @llvm.aarch64.sve.uqincp.n32.nxv4i1(i32 %a, <vscale x 4 x i1> %b)
207 define i32 @uqincp_n32_b64(i32 %a, <vscale x 2 x i1> %b) {
208 ; CHECK-LABEL: uqincp_n32_b64:
210 ; CHECK-NEXT: uqincp w0, p0.d
212 %out = call i32 @llvm.aarch64.sve.uqincp.n32.nxv2i1(i32 %a, <vscale x 2 x i1> %b)
216 define i64 @uqincp_n64_b8(i64 %a, <vscale x 16 x i1> %b) {
217 ; CHECK-LABEL: uqincp_n64_b8:
219 ; CHECK-NEXT: uqincp x0, p0.b
221 %out = call i64 @llvm.aarch64.sve.uqincp.n64.nxv16i1(i64 %a, <vscale x 16 x i1> %b)
225 define i64 @uqincp_n64_b16(i64 %a, <vscale x 8 x i1> %b) {
226 ; CHECK-LABEL: uqincp_n64_b16:
228 ; CHECK-NEXT: uqincp x0, p0.h
230 %out = call i64 @llvm.aarch64.sve.uqincp.n64.nxv8i1(i64 %a, <vscale x 8 x i1> %b)
234 define i64 @uqincp_n64_b32(i64 %a, <vscale x 4 x i1> %b) {
235 ; CHECK-LABEL: uqincp_n64_b32:
237 ; CHECK-NEXT: uqincp x0, p0.s
239 %out = call i64 @llvm.aarch64.sve.uqincp.n64.nxv4i1(i64 %a, <vscale x 4 x i1> %b)
243 define i64 @uqincp_n64_b64(i64 %a, <vscale x 2 x i1> %b) {
244 ; CHECK-LABEL: uqincp_n64_b64:
246 ; CHECK-NEXT: uqincp x0, p0.d
248 %out = call i64 @llvm.aarch64.sve.uqincp.n64.nxv2i1(i64 %a, <vscale x 2 x i1> %b)
252 ; uqinc{h|w|d}(vector, pattern, multiplier)
253 declare <vscale x 8 x i16> @llvm.aarch64.sve.uqinch.nxv8i16(<vscale x 8 x i16>, i32, i32)
254 declare <vscale x 4 x i32> @llvm.aarch64.sve.uqincw.nxv4i32(<vscale x 4 x i32>, i32, i32)
255 declare <vscale x 2 x i64> @llvm.aarch64.sve.uqincd.nxv2i64(<vscale x 2 x i64>, i32, i32)
257 ; uqinc{b|h|w|d}(scalar, pattern, multiplier)
258 declare i32 @llvm.aarch64.sve.uqincb.n32(i32, i32, i32)
259 declare i64 @llvm.aarch64.sve.uqincb.n64(i64, i32, i32)
260 declare i32 @llvm.aarch64.sve.uqinch.n32(i32, i32, i32)
261 declare i64 @llvm.aarch64.sve.uqinch.n64(i64, i32, i32)
262 declare i32 @llvm.aarch64.sve.uqincw.n32(i32, i32, i32)
263 declare i64 @llvm.aarch64.sve.uqincw.n64(i64, i32, i32)
264 declare i32 @llvm.aarch64.sve.uqincd.n32(i32, i32, i32)
265 declare i64 @llvm.aarch64.sve.uqincd.n64(i64, i32, i32)
267 ; uqincp(scalar, predicate)
268 declare i32 @llvm.aarch64.sve.uqincp.n32.nxv16i1(i32, <vscale x 16 x i1>)
269 declare i32 @llvm.aarch64.sve.uqincp.n32.nxv8i1(i32, <vscale x 8 x i1>)
270 declare i32 @llvm.aarch64.sve.uqincp.n32.nxv4i1(i32, <vscale x 4 x i1>)
271 declare i32 @llvm.aarch64.sve.uqincp.n32.nxv2i1(i32, <vscale x 2 x i1>)
273 declare i64 @llvm.aarch64.sve.uqincp.n64.nxv16i1(i64, <vscale x 16 x i1>)
274 declare i64 @llvm.aarch64.sve.uqincp.n64.nxv8i1(i64, <vscale x 8 x i1>)
275 declare i64 @llvm.aarch64.sve.uqincp.n64.nxv4i1(i64, <vscale x 4 x i1>)
276 declare i64 @llvm.aarch64.sve.uqincp.n64.nxv2i1(i64, <vscale x 2 x i1>)
278 ; uqincp(vector, predicate)
279 declare <vscale x 8 x i16> @llvm.aarch64.sve.uqincp.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i1>)
280 declare <vscale x 4 x i32> @llvm.aarch64.sve.uqincp.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>)
281 declare <vscale x 2 x i64> @llvm.aarch64.sve.uqincp.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>)