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 -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
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -verify -verify-ignore-unexpected=error %s
4 // 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
5
6 #include <arm_sve.h>
7
8 #ifdef SVE_OVERLOADED_FORMS
9 // A simple used,unused... macro, long enough to represent any SVE builtin.
10 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
11 #else
12 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
13 #endif
14
test_svrshr_n_s8_z(svbool_t pg,svint8_t op1)15 svint8_t test_svrshr_n_s8_z(svbool_t pg, svint8_t op1)
16 {
17 // CHECK-LABEL: test_svrshr_n_s8_z
18 // 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)
19 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.srshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %[[SEL]], i32 1)
20 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
21 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
22 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s8_z'}}
23 return SVE_ACLE_FUNC(svrshr,_n_s8,_z,)(pg, op1, 1);
24 }
25
test_svrshr_n_s8_z_1(svbool_t pg,svint8_t op1)26 svint8_t test_svrshr_n_s8_z_1(svbool_t pg, svint8_t op1)
27 {
28 // CHECK-LABEL: test_svrshr_n_s8_z_1
29 // 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)
30 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.srshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %[[SEL]], i32 8)
31 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
32 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
33 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s8_z'}}
34 return SVE_ACLE_FUNC(svrshr,_n_s8,_z,)(pg, op1, 8);
35 }
36
test_svrshr_n_s16_z(svbool_t pg,svint16_t op1)37 svint16_t test_svrshr_n_s16_z(svbool_t pg, svint16_t op1)
38 {
39 // CHECK-LABEL: test_svrshr_n_s16_z
40 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
41 // 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)
42 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.srshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %[[SEL]], i32 1)
43 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
44 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
45 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s16_z'}}
46 return SVE_ACLE_FUNC(svrshr,_n_s16,_z,)(pg, op1, 1);
47 }
48
test_svrshr_n_s16_z_1(svbool_t pg,svint16_t op1)49 svint16_t test_svrshr_n_s16_z_1(svbool_t pg, svint16_t op1)
50 {
51 // CHECK-LABEL: test_svrshr_n_s16_z_1
52 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
53 // 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)
54 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.srshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %[[SEL]], i32 16)
55 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
56 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
57 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s16_z'}}
58 return SVE_ACLE_FUNC(svrshr,_n_s16,_z,)(pg, op1, 16);
59 }
60
test_svrshr_n_s32_z(svbool_t pg,svint32_t op1)61 svint32_t test_svrshr_n_s32_z(svbool_t pg, svint32_t op1)
62 {
63 // CHECK-LABEL: test_svrshr_n_s32_z
64 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
65 // 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)
66 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.srshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %[[SEL]], i32 1)
67 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
68 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
69 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s32_z'}}
70 return SVE_ACLE_FUNC(svrshr,_n_s32,_z,)(pg, op1, 1);
71 }
72
test_svrshr_n_s32_z_1(svbool_t pg,svint32_t op1)73 svint32_t test_svrshr_n_s32_z_1(svbool_t pg, svint32_t op1)
74 {
75 // CHECK-LABEL: test_svrshr_n_s32_z_1
76 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
77 // 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)
78 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.srshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %[[SEL]], i32 32)
79 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
80 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
81 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s32_z'}}
82 return SVE_ACLE_FUNC(svrshr,_n_s32,_z,)(pg, op1, 32);
83 }
84
test_svrshr_n_s64_z(svbool_t pg,svint64_t op1)85 svint64_t test_svrshr_n_s64_z(svbool_t pg, svint64_t op1)
86 {
87 // CHECK-LABEL: test_svrshr_n_s64_z
88 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
89 // 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)
90 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.srshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %[[SEL]], i32 1)
91 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
92 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
93 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s64_z'}}
94 return SVE_ACLE_FUNC(svrshr,_n_s64,_z,)(pg, op1, 1);
95 }
96
test_svrshr_n_s64_z_1(svbool_t pg,svint64_t op1)97 svint64_t test_svrshr_n_s64_z_1(svbool_t pg, svint64_t op1)
98 {
99 // CHECK-LABEL: test_svrshr_n_s64_z_1
100 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
101 // 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)
102 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.srshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %[[SEL]], i32 64)
103 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
104 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
105 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s64_z'}}
106 return SVE_ACLE_FUNC(svrshr,_n_s64,_z,)(pg, op1, 64);
107 }
108
test_svrshr_n_u8_z(svbool_t pg,svuint8_t op1)109 svuint8_t test_svrshr_n_u8_z(svbool_t pg, svuint8_t op1)
110 {
111 // CHECK-LABEL: test_svrshr_n_u8_z
112 // 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)
113 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.urshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %[[SEL]], i32 1)
114 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
115 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
116 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u8_z'}}
117 return SVE_ACLE_FUNC(svrshr,_n_u8,_z,)(pg, op1, 1);
118 }
119
test_svrshr_n_u8_z_1(svbool_t pg,svuint8_t op1)120 svuint8_t test_svrshr_n_u8_z_1(svbool_t pg, svuint8_t op1)
121 {
122 // CHECK-LABEL: test_svrshr_n_u8_z_1
123 // 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)
124 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.urshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %[[SEL]], i32 8)
125 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
126 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
127 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u8_z'}}
128 return SVE_ACLE_FUNC(svrshr,_n_u8,_z,)(pg, op1, 8);
129 }
130
test_svrshr_n_u16_z(svbool_t pg,svuint16_t op1)131 svuint16_t test_svrshr_n_u16_z(svbool_t pg, svuint16_t op1)
132 {
133 // CHECK-LABEL: test_svrshr_n_u16_z
134 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
135 // 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)
136 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.urshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %[[SEL]], i32 1)
137 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
138 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
139 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u16_z'}}
140 return SVE_ACLE_FUNC(svrshr,_n_u16,_z,)(pg, op1, 1);
141 }
142
test_svrshr_n_u16_z_1(svbool_t pg,svuint16_t op1)143 svuint16_t test_svrshr_n_u16_z_1(svbool_t pg, svuint16_t op1)
144 {
145 // CHECK-LABEL: test_svrshr_n_u16_z_1
146 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
147 // 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)
148 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.urshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %[[SEL]], i32 16)
149 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
150 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
151 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u16_z'}}
152 return SVE_ACLE_FUNC(svrshr,_n_u16,_z,)(pg, op1, 16);
153 }
154
test_svrshr_n_u32_z(svbool_t pg,svuint32_t op1)155 svuint32_t test_svrshr_n_u32_z(svbool_t pg, svuint32_t op1)
156 {
157 // CHECK-LABEL: test_svrshr_n_u32_z
158 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
159 // 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)
160 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.urshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %[[SEL]], i32 1)
161 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
162 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
163 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u32_z'}}
164 return SVE_ACLE_FUNC(svrshr,_n_u32,_z,)(pg, op1, 1);
165 }
166
test_svrshr_n_u32_z_1(svbool_t pg,svuint32_t op1)167 svuint32_t test_svrshr_n_u32_z_1(svbool_t pg, svuint32_t op1)
168 {
169 // CHECK-LABEL: test_svrshr_n_u32_z_1
170 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
171 // 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)
172 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.urshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %[[SEL]], i32 32)
173 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
174 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
175 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u32_z'}}
176 return SVE_ACLE_FUNC(svrshr,_n_u32,_z,)(pg, op1, 32);
177 }
178
test_svrshr_n_u64_z(svbool_t pg,svuint64_t op1)179 svuint64_t test_svrshr_n_u64_z(svbool_t pg, svuint64_t op1)
180 {
181 // CHECK-LABEL: test_svrshr_n_u64_z
182 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
183 // 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)
184 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.urshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %[[SEL]], i32 1)
185 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
186 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
187 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u64_z'}}
188 return SVE_ACLE_FUNC(svrshr,_n_u64,_z,)(pg, op1, 1);
189 }
190
test_svrshr_n_u64_z_1(svbool_t pg,svuint64_t op1)191 svuint64_t test_svrshr_n_u64_z_1(svbool_t pg, svuint64_t op1)
192 {
193 // CHECK-LABEL: test_svrshr_n_u64_z_1
194 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
195 // 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)
196 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.urshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %[[SEL]], i32 64)
197 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
198 // overload-warning@+2 {{implicit declaration of function 'svrshr_z'}}
199 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u64_z'}}
200 return SVE_ACLE_FUNC(svrshr,_n_u64,_z,)(pg, op1, 64);
201 }
202
test_svrshr_n_s8_m(svbool_t pg,svint8_t op1)203 svint8_t test_svrshr_n_s8_m(svbool_t pg, svint8_t op1)
204 {
205 // CHECK-LABEL: test_svrshr_n_s8_m
206 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.srshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 1)
207 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
208 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
209 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s8_m'}}
210 return SVE_ACLE_FUNC(svrshr,_n_s8,_m,)(pg, op1, 1);
211 }
212
test_svrshr_n_s8_m_1(svbool_t pg,svint8_t op1)213 svint8_t test_svrshr_n_s8_m_1(svbool_t pg, svint8_t op1)
214 {
215 // CHECK-LABEL: test_svrshr_n_s8_m_1
216 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.srshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 8)
217 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
218 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
219 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s8_m'}}
220 return SVE_ACLE_FUNC(svrshr,_n_s8,_m,)(pg, op1, 8);
221 }
222
test_svrshr_n_s16_m(svbool_t pg,svint16_t op1)223 svint16_t test_svrshr_n_s16_m(svbool_t pg, svint16_t op1)
224 {
225 // CHECK-LABEL: test_svrshr_n_s16_m
226 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
227 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.srshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 1)
228 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
229 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
230 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s16_m'}}
231 return SVE_ACLE_FUNC(svrshr,_n_s16,_m,)(pg, op1, 1);
232 }
233
test_svrshr_n_s16_m_1(svbool_t pg,svint16_t op1)234 svint16_t test_svrshr_n_s16_m_1(svbool_t pg, svint16_t op1)
235 {
236 // CHECK-LABEL: test_svrshr_n_s16_m_1
237 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
238 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.srshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 16)
239 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
240 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
241 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s16_m'}}
242 return SVE_ACLE_FUNC(svrshr,_n_s16,_m,)(pg, op1, 16);
243 }
244
test_svrshr_n_s32_m(svbool_t pg,svint32_t op1)245 svint32_t test_svrshr_n_s32_m(svbool_t pg, svint32_t op1)
246 {
247 // CHECK-LABEL: test_svrshr_n_s32_m
248 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
249 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.srshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 1)
250 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
251 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
252 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s32_m'}}
253 return SVE_ACLE_FUNC(svrshr,_n_s32,_m,)(pg, op1, 1);
254 }
255
test_svrshr_n_s32_m_1(svbool_t pg,svint32_t op1)256 svint32_t test_svrshr_n_s32_m_1(svbool_t pg, svint32_t op1)
257 {
258 // CHECK-LABEL: test_svrshr_n_s32_m_1
259 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
260 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.srshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 32)
261 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
262 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
263 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s32_m'}}
264 return SVE_ACLE_FUNC(svrshr,_n_s32,_m,)(pg, op1, 32);
265 }
266
test_svrshr_n_s64_m(svbool_t pg,svint64_t op1)267 svint64_t test_svrshr_n_s64_m(svbool_t pg, svint64_t op1)
268 {
269 // CHECK-LABEL: test_svrshr_n_s64_m
270 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
271 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.srshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 1)
272 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
273 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
274 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s64_m'}}
275 return SVE_ACLE_FUNC(svrshr,_n_s64,_m,)(pg, op1, 1);
276 }
277
test_svrshr_n_s64_m_1(svbool_t pg,svint64_t op1)278 svint64_t test_svrshr_n_s64_m_1(svbool_t pg, svint64_t op1)
279 {
280 // CHECK-LABEL: test_svrshr_n_s64_m_1
281 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
282 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.srshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 64)
283 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
284 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
285 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s64_m'}}
286 return SVE_ACLE_FUNC(svrshr,_n_s64,_m,)(pg, op1, 64);
287 }
288
test_svrshr_n_u8_m(svbool_t pg,svuint8_t op1)289 svuint8_t test_svrshr_n_u8_m(svbool_t pg, svuint8_t op1)
290 {
291 // CHECK-LABEL: test_svrshr_n_u8_m
292 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.urshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 1)
293 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
294 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
295 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u8_m'}}
296 return SVE_ACLE_FUNC(svrshr,_n_u8,_m,)(pg, op1, 1);
297 }
298
test_svrshr_n_u8_m_1(svbool_t pg,svuint8_t op1)299 svuint8_t test_svrshr_n_u8_m_1(svbool_t pg, svuint8_t op1)
300 {
301 // CHECK-LABEL: test_svrshr_n_u8_m_1
302 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.urshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 8)
303 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
304 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
305 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u8_m'}}
306 return SVE_ACLE_FUNC(svrshr,_n_u8,_m,)(pg, op1, 8);
307 }
308
test_svrshr_n_u16_m(svbool_t pg,svuint16_t op1)309 svuint16_t test_svrshr_n_u16_m(svbool_t pg, svuint16_t op1)
310 {
311 // CHECK-LABEL: test_svrshr_n_u16_m
312 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
313 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.urshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 1)
314 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
315 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
316 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u16_m'}}
317 return SVE_ACLE_FUNC(svrshr,_n_u16,_m,)(pg, op1, 1);
318 }
319
test_svrshr_n_u16_m_1(svbool_t pg,svuint16_t op1)320 svuint16_t test_svrshr_n_u16_m_1(svbool_t pg, svuint16_t op1)
321 {
322 // CHECK-LABEL: test_svrshr_n_u16_m_1
323 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
324 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.urshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 16)
325 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
326 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
327 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u16_m'}}
328 return SVE_ACLE_FUNC(svrshr,_n_u16,_m,)(pg, op1, 16);
329 }
330
test_svrshr_n_u32_m(svbool_t pg,svuint32_t op1)331 svuint32_t test_svrshr_n_u32_m(svbool_t pg, svuint32_t op1)
332 {
333 // CHECK-LABEL: test_svrshr_n_u32_m
334 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
335 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.urshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 1)
336 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
337 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
338 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u32_m'}}
339 return SVE_ACLE_FUNC(svrshr,_n_u32,_m,)(pg, op1, 1);
340 }
341
test_svrshr_n_u32_m_1(svbool_t pg,svuint32_t op1)342 svuint32_t test_svrshr_n_u32_m_1(svbool_t pg, svuint32_t op1)
343 {
344 // CHECK-LABEL: test_svrshr_n_u32_m_1
345 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
346 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.urshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 32)
347 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
348 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
349 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u32_m'}}
350 return SVE_ACLE_FUNC(svrshr,_n_u32,_m,)(pg, op1, 32);
351 }
352
test_svrshr_n_u64_m(svbool_t pg,svuint64_t op1)353 svuint64_t test_svrshr_n_u64_m(svbool_t pg, svuint64_t op1)
354 {
355 // CHECK-LABEL: test_svrshr_n_u64_m
356 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
357 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.urshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 1)
358 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
359 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
360 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u64_m'}}
361 return SVE_ACLE_FUNC(svrshr,_n_u64,_m,)(pg, op1, 1);
362 }
363
test_svrshr_n_u64_m_1(svbool_t pg,svuint64_t op1)364 svuint64_t test_svrshr_n_u64_m_1(svbool_t pg, svuint64_t op1)
365 {
366 // CHECK-LABEL: test_svrshr_n_u64_m_1
367 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
368 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.urshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 64)
369 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
370 // overload-warning@+2 {{implicit declaration of function 'svrshr_m'}}
371 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u64_m'}}
372 return SVE_ACLE_FUNC(svrshr,_n_u64,_m,)(pg, op1, 64);
373 }
374
test_svrshr_n_s8_x(svbool_t pg,svint8_t op1)375 svint8_t test_svrshr_n_s8_x(svbool_t pg, svint8_t op1)
376 {
377 // CHECK-LABEL: test_svrshr_n_s8_x
378 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.srshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 1)
379 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
380 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
381 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s8_x'}}
382 return SVE_ACLE_FUNC(svrshr,_n_s8,_x,)(pg, op1, 1);
383 }
384
test_svrshr_n_s8_x_1(svbool_t pg,svint8_t op1)385 svint8_t test_svrshr_n_s8_x_1(svbool_t pg, svint8_t op1)
386 {
387 // CHECK-LABEL: test_svrshr_n_s8_x_1
388 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.srshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 8)
389 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
390 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
391 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s8_x'}}
392 return SVE_ACLE_FUNC(svrshr,_n_s8,_x,)(pg, op1, 8);
393 }
394
test_svrshr_n_s16_x(svbool_t pg,svint16_t op1)395 svint16_t test_svrshr_n_s16_x(svbool_t pg, svint16_t op1)
396 {
397 // CHECK-LABEL: test_svrshr_n_s16_x
398 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
399 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.srshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 1)
400 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
401 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
402 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s16_x'}}
403 return SVE_ACLE_FUNC(svrshr,_n_s16,_x,)(pg, op1, 1);
404 }
405
test_svrshr_n_s16_x_1(svbool_t pg,svint16_t op1)406 svint16_t test_svrshr_n_s16_x_1(svbool_t pg, svint16_t op1)
407 {
408 // CHECK-LABEL: test_svrshr_n_s16_x_1
409 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
410 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.srshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 16)
411 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
412 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
413 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s16_x'}}
414 return SVE_ACLE_FUNC(svrshr,_n_s16,_x,)(pg, op1, 16);
415 }
416
test_svrshr_n_s32_x(svbool_t pg,svint32_t op1)417 svint32_t test_svrshr_n_s32_x(svbool_t pg, svint32_t op1)
418 {
419 // CHECK-LABEL: test_svrshr_n_s32_x
420 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
421 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.srshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 1)
422 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
423 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
424 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s32_x'}}
425 return SVE_ACLE_FUNC(svrshr,_n_s32,_x,)(pg, op1, 1);
426 }
427
test_svrshr_n_s32_x_1(svbool_t pg,svint32_t op1)428 svint32_t test_svrshr_n_s32_x_1(svbool_t pg, svint32_t op1)
429 {
430 // CHECK-LABEL: test_svrshr_n_s32_x_1
431 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
432 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.srshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 32)
433 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
434 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
435 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s32_x'}}
436 return SVE_ACLE_FUNC(svrshr,_n_s32,_x,)(pg, op1, 32);
437 }
438
test_svrshr_n_s64_x(svbool_t pg,svint64_t op1)439 svint64_t test_svrshr_n_s64_x(svbool_t pg, svint64_t op1)
440 {
441 // CHECK-LABEL: test_svrshr_n_s64_x
442 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
443 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.srshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 1)
444 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
445 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
446 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s64_x'}}
447 return SVE_ACLE_FUNC(svrshr,_n_s64,_x,)(pg, op1, 1);
448 }
449
test_svrshr_n_s64_x_1(svbool_t pg,svint64_t op1)450 svint64_t test_svrshr_n_s64_x_1(svbool_t pg, svint64_t op1)
451 {
452 // CHECK-LABEL: test_svrshr_n_s64_x_1
453 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
454 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.srshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 64)
455 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
456 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
457 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_s64_x'}}
458 return SVE_ACLE_FUNC(svrshr,_n_s64,_x,)(pg, op1, 64);
459 }
460
test_svrshr_n_u8_x(svbool_t pg,svuint8_t op1)461 svuint8_t test_svrshr_n_u8_x(svbool_t pg, svuint8_t op1)
462 {
463 // CHECK-LABEL: test_svrshr_n_u8_x
464 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.urshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 1)
465 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
466 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
467 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u8_x'}}
468 return SVE_ACLE_FUNC(svrshr,_n_u8,_x,)(pg, op1, 1);
469 }
470
test_svrshr_n_u8_x_1(svbool_t pg,svuint8_t op1)471 svuint8_t test_svrshr_n_u8_x_1(svbool_t pg, svuint8_t op1)
472 {
473 // CHECK-LABEL: test_svrshr_n_u8_x_1
474 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.urshr.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %op1, i32 8)
475 // CHECK: ret <vscale x 16 x i8> %[[INTRINSIC]]
476 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
477 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u8_x'}}
478 return SVE_ACLE_FUNC(svrshr,_n_u8,_x,)(pg, op1, 8);
479 }
480
test_svrshr_n_u16_x(svbool_t pg,svuint16_t op1)481 svuint16_t test_svrshr_n_u16_x(svbool_t pg, svuint16_t op1)
482 {
483 // CHECK-LABEL: test_svrshr_n_u16_x
484 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
485 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.urshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 1)
486 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
487 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
488 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u16_x'}}
489 return SVE_ACLE_FUNC(svrshr,_n_u16,_x,)(pg, op1, 1);
490 }
491
test_svrshr_n_u16_x_1(svbool_t pg,svuint16_t op1)492 svuint16_t test_svrshr_n_u16_x_1(svbool_t pg, svuint16_t op1)
493 {
494 // CHECK-LABEL: test_svrshr_n_u16_x_1
495 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
496 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.urshr.nxv8i16(<vscale x 8 x i1> %[[PG]], <vscale x 8 x i16> %op1, i32 16)
497 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
498 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
499 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u16_x'}}
500 return SVE_ACLE_FUNC(svrshr,_n_u16,_x,)(pg, op1, 16);
501 }
502
test_svrshr_n_u32_x(svbool_t pg,svuint32_t op1)503 svuint32_t test_svrshr_n_u32_x(svbool_t pg, svuint32_t op1)
504 {
505 // CHECK-LABEL: test_svrshr_n_u32_x
506 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
507 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.urshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 1)
508 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
509 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
510 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u32_x'}}
511 return SVE_ACLE_FUNC(svrshr,_n_u32,_x,)(pg, op1, 1);
512 }
513
test_svrshr_n_u32_x_1(svbool_t pg,svuint32_t op1)514 svuint32_t test_svrshr_n_u32_x_1(svbool_t pg, svuint32_t op1)
515 {
516 // CHECK-LABEL: test_svrshr_n_u32_x_1
517 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
518 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.urshr.nxv4i32(<vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op1, i32 32)
519 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
520 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
521 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u32_x'}}
522 return SVE_ACLE_FUNC(svrshr,_n_u32,_x,)(pg, op1, 32);
523 }
524
test_svrshr_n_u64_x(svbool_t pg,svuint64_t op1)525 svuint64_t test_svrshr_n_u64_x(svbool_t pg, svuint64_t op1)
526 {
527 // CHECK-LABEL: test_svrshr_n_u64_x
528 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
529 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.urshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 1)
530 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
531 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
532 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u64_x'}}
533 return SVE_ACLE_FUNC(svrshr,_n_u64,_x,)(pg, op1, 1);
534 }
535
test_svrshr_n_u64_x_1(svbool_t pg,svuint64_t op1)536 svuint64_t test_svrshr_n_u64_x_1(svbool_t pg, svuint64_t op1)
537 {
538 // CHECK-LABEL: test_svrshr_n_u64_x_1
539 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
540 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.urshr.nxv2i64(<vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op1, i32 64)
541 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
542 // overload-warning@+2 {{implicit declaration of function 'svrshr_x'}}
543 // expected-warning@+1 {{implicit declaration of function 'svrshr_n_u64_x'}}
544 return SVE_ACLE_FUNC(svrshr,_n_u64,_x,)(pg, op1, 64);
545 }
546