1 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s
3 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
4 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s
5 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -verify -verify-ignore-unexpected=error %s
6 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -verify=overload -verify-ignore-unexpected=error %s
7
8 #include <arm_sve.h>
9
10 #ifdef SVE_OVERLOADED_FORMS
11 // A simple used,unused... macro, long enough to represent any SVE builtin.
12 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
13 #else
14 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
15 #endif
16
test_svqshlu_n_s8_z(svbool_t pg,svint8_t op1)17 svuint8_t test_svqshlu_n_s8_z(svbool_t pg, svint8_t op1)
18 {
19 // CHECK-LABEL: test_svqshlu_n_s8_z
20 // CHECK: %[[SEL:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.sel.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, <vscale x 16 x i8> zeroinitializer)
21 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.sqshlu.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %[[SEL]], i32 0)
22 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
23 // overload-warning@+2 {{implicit declaration of function 'svqshlu_z'}}
24 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s8_z'}}
25 return SVE_ACLE_FUNC(svqshlu,_n_s8,_z,)(pg, op1, 0);
26 }
27
test_svqshlu_n_s8_z_1(svbool_t pg,svint8_t op1)28 svuint8_t test_svqshlu_n_s8_z_1(svbool_t pg, svint8_t op1)
29 {
30 // CHECK-LABEL: test_svqshlu_n_s8_z_1
31 // CHECK: %[[SEL:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.sel.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, <vscale x 16 x i8> zeroinitializer)
32 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.sqshlu.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %[[SEL]], i32 7)
33 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
34 // overload-warning@+2 {{implicit declaration of function 'svqshlu_z'}}
35 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s8_z'}}
36 return SVE_ACLE_FUNC(svqshlu,_n_s8,_z,)(pg, op1, 7);
37 }
38
test_svqshlu_n_s16_z(svbool_t pg,svint16_t op1)39 svuint16_t test_svqshlu_n_s16_z(svbool_t pg, svint16_t op1)
40 {
41 // CHECK-LABEL: test_svqshlu_n_s16_z
42 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
43 // CHECK: %[[SEL:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.sel.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, <vscale x 8 x i16> zeroinitializer)
44 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.sqshlu.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %[[SEL]], i32 0)
45 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
46 // overload-warning@+2 {{implicit declaration of function 'svqshlu_z'}}
47 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s16_z'}}
48 return SVE_ACLE_FUNC(svqshlu,_n_s16,_z,)(pg, op1, 0);
49 }
50
test_svqshlu_n_s16_z_1(svbool_t pg,svint16_t op1)51 svuint16_t test_svqshlu_n_s16_z_1(svbool_t pg, svint16_t op1)
52 {
53 // CHECK-LABEL: test_svqshlu_n_s16_z_1
54 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
55 // CHECK: %[[SEL:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.sel.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, <vscale x 8 x i16> zeroinitializer)
56 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.sqshlu.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %[[SEL]], i32 15)
57 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
58 // overload-warning@+2 {{implicit declaration of function 'svqshlu_z'}}
59 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s16_z'}}
60 return SVE_ACLE_FUNC(svqshlu,_n_s16,_z,)(pg, op1, 15);
61 }
62
test_svqshlu_n_s32_z(svbool_t pg,svint32_t op1)63 svuint32_t test_svqshlu_n_s32_z(svbool_t pg, svint32_t op1)
64 {
65 // CHECK-LABEL: test_svqshlu_n_s32_z
66 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
67 // CHECK: %[[SEL:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.sel.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, <vscale x 4 x i32> zeroinitializer)
68 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.sqshlu.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %[[SEL]], i32 0)
69 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
70 // overload-warning@+2 {{implicit declaration of function 'svqshlu_z'}}
71 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s32_z'}}
72 return SVE_ACLE_FUNC(svqshlu,_n_s32,_z,)(pg, op1, 0);
73 }
74
test_svqshlu_n_s32_z_1(svbool_t pg,svint32_t op1)75 svuint32_t test_svqshlu_n_s32_z_1(svbool_t pg, svint32_t op1)
76 {
77 // CHECK-LABEL: test_svqshlu_n_s32_z_1
78 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
79 // CHECK: %[[SEL:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.sel.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, <vscale x 4 x i32> zeroinitializer)
80 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.sqshlu.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %[[SEL]], i32 31)
81 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
82 // overload-warning@+2 {{implicit declaration of function 'svqshlu_z'}}
83 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s32_z'}}
84 return SVE_ACLE_FUNC(svqshlu,_n_s32,_z,)(pg, op1, 31);
85 }
86
test_svqshlu_n_s64_z(svbool_t pg,svint64_t op1)87 svuint64_t test_svqshlu_n_s64_z(svbool_t pg, svint64_t op1)
88 {
89 // CHECK-LABEL: test_svqshlu_n_s64_z
90 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
91 // CHECK: %[[SEL:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.sel.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, <vscale x 2 x i64> zeroinitializer)
92 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.sqshlu.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %[[SEL]], i32 0)
93 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
94 // overload-warning@+2 {{implicit declaration of function 'svqshlu_z'}}
95 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s64_z'}}
96 return SVE_ACLE_FUNC(svqshlu,_n_s64,_z,)(pg, op1, 0);
97 }
98
test_svqshlu_n_s64_z_1(svbool_t pg,svint64_t op1)99 svuint64_t test_svqshlu_n_s64_z_1(svbool_t pg, svint64_t op1)
100 {
101 // CHECK-LABEL: test_svqshlu_n_s64_z_1
102 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
103 // CHECK: %[[SEL:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.sel.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, <vscale x 2 x i64> zeroinitializer)
104 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.sqshlu.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %[[SEL]], i32 63)
105 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
106 // overload-warning@+2 {{implicit declaration of function 'svqshlu_z'}}
107 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s64_z'}}
108 return SVE_ACLE_FUNC(svqshlu,_n_s64,_z,)(pg, op1, 63);
109 }
110
test_svqshlu_n_s8_m(svbool_t pg,svint8_t op1)111 svuint8_t test_svqshlu_n_s8_m(svbool_t pg, svint8_t op1)
112 {
113 // CHECK-LABEL: test_svqshlu_n_s8_m
114 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.sqshlu.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 0)
115 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
116 // overload-warning@+2 {{implicit declaration of function 'svqshlu_m'}}
117 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s8_m'}}
118 return SVE_ACLE_FUNC(svqshlu,_n_s8,_m,)(pg, op1, 0);
119 }
120
test_svqshlu_n_s8_m_1(svbool_t pg,svint8_t op1)121 svuint8_t test_svqshlu_n_s8_m_1(svbool_t pg, svint8_t op1)
122 {
123 // CHECK-LABEL: test_svqshlu_n_s8_m_1
124 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.sqshlu.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 7)
125 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
126 // overload-warning@+2 {{implicit declaration of function 'svqshlu_m'}}
127 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s8_m'}}
128 return SVE_ACLE_FUNC(svqshlu,_n_s8,_m,)(pg, op1, 7);
129 }
130
test_svqshlu_n_s16_m(svbool_t pg,svint16_t op1)131 svuint16_t test_svqshlu_n_s16_m(svbool_t pg, svint16_t op1)
132 {
133 // CHECK-LABEL: test_svqshlu_n_s16_m
134 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
135 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.sqshlu.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 0)
136 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
137 // overload-warning@+2 {{implicit declaration of function 'svqshlu_m'}}
138 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s16_m'}}
139 return SVE_ACLE_FUNC(svqshlu,_n_s16,_m,)(pg, op1, 0);
140 }
141
test_svqshlu_n_s16_m_1(svbool_t pg,svint16_t op1)142 svuint16_t test_svqshlu_n_s16_m_1(svbool_t pg, svint16_t op1)
143 {
144 // CHECK-LABEL: test_svqshlu_n_s16_m_1
145 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
146 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.sqshlu.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 15)
147 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
148 // overload-warning@+2 {{implicit declaration of function 'svqshlu_m'}}
149 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s16_m'}}
150 return SVE_ACLE_FUNC(svqshlu,_n_s16,_m,)(pg, op1, 15);
151 }
152
test_svqshlu_n_s32_m(svbool_t pg,svint32_t op1)153 svuint32_t test_svqshlu_n_s32_m(svbool_t pg, svint32_t op1)
154 {
155 // CHECK-LABEL: test_svqshlu_n_s32_m
156 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
157 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.sqshlu.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 0)
158 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
159 // overload-warning@+2 {{implicit declaration of function 'svqshlu_m'}}
160 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s32_m'}}
161 return SVE_ACLE_FUNC(svqshlu,_n_s32,_m,)(pg, op1, 0);
162 }
163
test_svqshlu_n_s32_m_1(svbool_t pg,svint32_t op1)164 svuint32_t test_svqshlu_n_s32_m_1(svbool_t pg, svint32_t op1)
165 {
166 // CHECK-LABEL: test_svqshlu_n_s32_m_1
167 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
168 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.sqshlu.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 31)
169 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
170 // overload-warning@+2 {{implicit declaration of function 'svqshlu_m'}}
171 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s32_m'}}
172 return SVE_ACLE_FUNC(svqshlu,_n_s32,_m,)(pg, op1, 31);
173 }
174
test_svqshlu_n_s64_m(svbool_t pg,svint64_t op1)175 svuint64_t test_svqshlu_n_s64_m(svbool_t pg, svint64_t op1)
176 {
177 // CHECK-LABEL: test_svqshlu_n_s64_m
178 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
179 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.sqshlu.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 0)
180 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
181 // overload-warning@+2 {{implicit declaration of function 'svqshlu_m'}}
182 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s64_m'}}
183 return SVE_ACLE_FUNC(svqshlu,_n_s64,_m,)(pg, op1, 0);
184 }
185
test_svqshlu_n_s64_m_1(svbool_t pg,svint64_t op1)186 svuint64_t test_svqshlu_n_s64_m_1(svbool_t pg, svint64_t op1)
187 {
188 // CHECK-LABEL: test_svqshlu_n_s64_m_1
189 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
190 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.sqshlu.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 63)
191 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
192 // overload-warning@+2 {{implicit declaration of function 'svqshlu_m'}}
193 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s64_m'}}
194 return SVE_ACLE_FUNC(svqshlu,_n_s64,_m,)(pg, op1, 63);
195 }
196
test_svqshlu_n_s8_x(svbool_t pg,svint8_t op1)197 svuint8_t test_svqshlu_n_s8_x(svbool_t pg, svint8_t op1)
198 {
199 // CHECK-LABEL: test_svqshlu_n_s8_x
200 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.sqshlu.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 0)
201 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
202 // overload-warning@+2 {{implicit declaration of function 'svqshlu_x'}}
203 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s8_x'}}
204 return SVE_ACLE_FUNC(svqshlu,_n_s8,_x,)(pg, op1, 0);
205 }
206
test_svqshlu_n_s8_x_1(svbool_t pg,svint8_t op1)207 svuint8_t test_svqshlu_n_s8_x_1(svbool_t pg, svint8_t op1)
208 {
209 // CHECK-LABEL: test_svqshlu_n_s8_x_1
210 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.sqshlu.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 7)
211 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
212 // overload-warning@+2 {{implicit declaration of function 'svqshlu_x'}}
213 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s8_x'}}
214 return SVE_ACLE_FUNC(svqshlu,_n_s8,_x,)(pg, op1, 7);
215 }
216
test_svqshlu_n_s16_x(svbool_t pg,svint16_t op1)217 svuint16_t test_svqshlu_n_s16_x(svbool_t pg, svint16_t op1)
218 {
219 // CHECK-LABEL: test_svqshlu_n_s16_x
220 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
221 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.sqshlu.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 0)
222 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
223 // overload-warning@+2 {{implicit declaration of function 'svqshlu_x'}}
224 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s16_x'}}
225 return SVE_ACLE_FUNC(svqshlu,_n_s16,_x,)(pg, op1, 0);
226 }
227
test_svqshlu_n_s16_x_1(svbool_t pg,svint16_t op1)228 svuint16_t test_svqshlu_n_s16_x_1(svbool_t pg, svint16_t op1)
229 {
230 // CHECK-LABEL: test_svqshlu_n_s16_x_1
231 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
232 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.sqshlu.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 15)
233 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
234 // overload-warning@+2 {{implicit declaration of function 'svqshlu_x'}}
235 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s16_x'}}
236 return SVE_ACLE_FUNC(svqshlu,_n_s16,_x,)(pg, op1, 15);
237 }
238
test_svqshlu_n_s32_x(svbool_t pg,svint32_t op1)239 svuint32_t test_svqshlu_n_s32_x(svbool_t pg, svint32_t op1)
240 {
241 // CHECK-LABEL: test_svqshlu_n_s32_x
242 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
243 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.sqshlu.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 0)
244 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
245 // overload-warning@+2 {{implicit declaration of function 'svqshlu_x'}}
246 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s32_x'}}
247 return SVE_ACLE_FUNC(svqshlu,_n_s32,_x,)(pg, op1, 0);
248 }
249
test_svqshlu_n_s32_x_1(svbool_t pg,svint32_t op1)250 svuint32_t test_svqshlu_n_s32_x_1(svbool_t pg, svint32_t op1)
251 {
252 // CHECK-LABEL: test_svqshlu_n_s32_x_1
253 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
254 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.sqshlu.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 31)
255 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
256 // overload-warning@+2 {{implicit declaration of function 'svqshlu_x'}}
257 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s32_x'}}
258 return SVE_ACLE_FUNC(svqshlu,_n_s32,_x,)(pg, op1, 31);
259 }
260
test_svqshlu_n_s64_x(svbool_t pg,svint64_t op1)261 svuint64_t test_svqshlu_n_s64_x(svbool_t pg, svint64_t op1)
262 {
263 // CHECK-LABEL: test_svqshlu_n_s64_x
264 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
265 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.sqshlu.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 0)
266 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
267 // overload-warning@+2 {{implicit declaration of function 'svqshlu_x'}}
268 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s64_x'}}
269 return SVE_ACLE_FUNC(svqshlu,_n_s64,_x,)(pg, op1, 0);
270 }
271
test_svqshlu_n_s64_x_1(svbool_t pg,svint64_t op1)272 svuint64_t test_svqshlu_n_s64_x_1(svbool_t pg, svint64_t op1)
273 {
274 // CHECK-LABEL: test_svqshlu_n_s64_x_1
275 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
276 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.sqshlu.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 63)
277 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
278 // overload-warning@+2 {{implicit declaration of function 'svqshlu_x'}}
279 // expected-warning@+1 {{implicit declaration of function 'svqshlu_n_s64_x'}}
280 return SVE_ACLE_FUNC(svqshlu,_n_s64,_x,)(pg, op1, 63);
281 }
282