1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -O0 -disable-O0-optnone -emit-llvm -o - %s | opt -S -passes='mem2reg,sroa,early-cse<>' | FileCheck %s
3 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -O0 -disable-O0-optnone -DPOLYMORPHIC -emit-llvm -o - %s | opt -S -passes='mem2reg,sroa,early-cse<>' | FileCheck %s
4
5 // REQUIRES: aarch64-registered-target || arm-registered-target
6
7 #include <arm_mve.h>
8
9 // CHECK-LABEL: @test_vdupq_n_f16(
10 // CHECK-NEXT: entry:
11 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> poison, half [[A:%.*]], i64 0
12 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> poison, <8 x i32> zeroinitializer
13 // CHECK-NEXT: ret <8 x half> [[DOTSPLAT]]
14 //
test_vdupq_n_f16(float16_t a)15 float16x8_t test_vdupq_n_f16(float16_t a)
16 {
17 return vdupq_n_f16(a);
18 }
19
20 // CHECK-LABEL: @test_vdupq_n_f32(
21 // CHECK-NEXT: entry:
22 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> poison, float [[A:%.*]], i64 0
23 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> poison, <4 x i32> zeroinitializer
24 // CHECK-NEXT: ret <4 x float> [[DOTSPLAT]]
25 //
test_vdupq_n_f32(float32_t a)26 float32x4_t test_vdupq_n_f32(float32_t a)
27 {
28 return vdupq_n_f32(a);
29 }
30
31 // CHECK-LABEL: @test_vdupq_n_s8(
32 // CHECK-NEXT: entry:
33 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[A:%.*]], i64 0
34 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer
35 // CHECK-NEXT: ret <16 x i8> [[DOTSPLAT]]
36 //
test_vdupq_n_s8(int8_t a)37 int8x16_t test_vdupq_n_s8(int8_t a)
38 {
39 return vdupq_n_s8(a);
40 }
41
42 // CHECK-LABEL: @test_vdupq_n_s16(
43 // CHECK-NEXT: entry:
44 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[A:%.*]], i64 0
45 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer
46 // CHECK-NEXT: ret <8 x i16> [[DOTSPLAT]]
47 //
test_vdupq_n_s16(int16_t a)48 int16x8_t test_vdupq_n_s16(int16_t a)
49 {
50 return vdupq_n_s16(a);
51 }
52
53 // CHECK-LABEL: @test_vdupq_n_s32(
54 // CHECK-NEXT: entry:
55 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[A:%.*]], i64 0
56 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
57 // CHECK-NEXT: ret <4 x i32> [[DOTSPLAT]]
58 //
test_vdupq_n_s32(int32_t a)59 int32x4_t test_vdupq_n_s32(int32_t a)
60 {
61 return vdupq_n_s32(a);
62 }
63
64 // CHECK-LABEL: @test_vdupq_n_u8(
65 // CHECK-NEXT: entry:
66 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[A:%.*]], i64 0
67 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer
68 // CHECK-NEXT: ret <16 x i8> [[DOTSPLAT]]
69 //
test_vdupq_n_u8(uint8_t a)70 uint8x16_t test_vdupq_n_u8(uint8_t a)
71 {
72 return vdupq_n_u8(a);
73 }
74
75 // CHECK-LABEL: @test_vdupq_n_u16(
76 // CHECK-NEXT: entry:
77 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[A:%.*]], i64 0
78 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer
79 // CHECK-NEXT: ret <8 x i16> [[DOTSPLAT]]
80 //
test_vdupq_n_u16(uint16_t a)81 uint16x8_t test_vdupq_n_u16(uint16_t a)
82 {
83 return vdupq_n_u16(a);
84 }
85
86 // CHECK-LABEL: @test_vdupq_n_u32(
87 // CHECK-NEXT: entry:
88 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[A:%.*]], i64 0
89 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
90 // CHECK-NEXT: ret <4 x i32> [[DOTSPLAT]]
91 //
test_vdupq_n_u32(uint32_t a)92 uint32x4_t test_vdupq_n_u32(uint32_t a)
93 {
94 return vdupq_n_u32(a);
95 }
96
97 // CHECK-LABEL: @test_vdupq_m_n_f16(
98 // CHECK-NEXT: entry:
99 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
100 // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
101 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> poison, half [[A:%.*]], i64 0
102 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> poison, <8 x i32> zeroinitializer
103 // CHECK-NEXT: [[TMP2:%.*]] = select <8 x i1> [[TMP1]], <8 x half> [[DOTSPLAT]], <8 x half> [[INACTIVE:%.*]]
104 // CHECK-NEXT: ret <8 x half> [[TMP2]]
105 //
test_vdupq_m_n_f16(float16x8_t inactive,float16_t a,mve_pred16_t p)106 float16x8_t test_vdupq_m_n_f16(float16x8_t inactive, float16_t a, mve_pred16_t p)
107 {
108 #ifdef POLYMORPHIC
109 return vdupq_m(inactive, a, p);
110 #else /* POLYMORPHIC */
111 return vdupq_m_n_f16(inactive, a, p);
112 #endif /* POLYMORPHIC */
113 }
114
115 // CHECK-LABEL: @test_vdupq_m_n_f32(
116 // CHECK-NEXT: entry:
117 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
118 // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
119 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> poison, float [[A:%.*]], i64 0
120 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> poison, <4 x i32> zeroinitializer
121 // CHECK-NEXT: [[TMP2:%.*]] = select <4 x i1> [[TMP1]], <4 x float> [[DOTSPLAT]], <4 x float> [[INACTIVE:%.*]]
122 // CHECK-NEXT: ret <4 x float> [[TMP2]]
123 //
test_vdupq_m_n_f32(float32x4_t inactive,float32_t a,mve_pred16_t p)124 float32x4_t test_vdupq_m_n_f32(float32x4_t inactive, float32_t a, mve_pred16_t p)
125 {
126 #ifdef POLYMORPHIC
127 return vdupq_m(inactive, a, p);
128 #else /* POLYMORPHIC */
129 return vdupq_m_n_f32(inactive, a, p);
130 #endif /* POLYMORPHIC */
131 }
132
133 // CHECK-LABEL: @test_vdupq_m_n_s8(
134 // CHECK-NEXT: entry:
135 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
136 // CHECK-NEXT: [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
137 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[A:%.*]], i64 0
138 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer
139 // CHECK-NEXT: [[TMP2:%.*]] = select <16 x i1> [[TMP1]], <16 x i8> [[DOTSPLAT]], <16 x i8> [[INACTIVE:%.*]]
140 // CHECK-NEXT: ret <16 x i8> [[TMP2]]
141 //
test_vdupq_m_n_s8(int8x16_t inactive,int8_t a,mve_pred16_t p)142 int8x16_t test_vdupq_m_n_s8(int8x16_t inactive, int8_t a, mve_pred16_t p)
143 {
144 #ifdef POLYMORPHIC
145 return vdupq_m(inactive, a, p);
146 #else /* POLYMORPHIC */
147 return vdupq_m_n_s8(inactive, a, p);
148 #endif /* POLYMORPHIC */
149 }
150
151 // CHECK-LABEL: @test_vdupq_m_n_s16(
152 // CHECK-NEXT: entry:
153 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
154 // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
155 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[A:%.*]], i64 0
156 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer
157 // CHECK-NEXT: [[TMP2:%.*]] = select <8 x i1> [[TMP1]], <8 x i16> [[DOTSPLAT]], <8 x i16> [[INACTIVE:%.*]]
158 // CHECK-NEXT: ret <8 x i16> [[TMP2]]
159 //
test_vdupq_m_n_s16(int16x8_t inactive,int16_t a,mve_pred16_t p)160 int16x8_t test_vdupq_m_n_s16(int16x8_t inactive, int16_t a, mve_pred16_t p)
161 {
162 #ifdef POLYMORPHIC
163 return vdupq_m(inactive, a, p);
164 #else /* POLYMORPHIC */
165 return vdupq_m_n_s16(inactive, a, p);
166 #endif /* POLYMORPHIC */
167 }
168
169 // CHECK-LABEL: @test_vdupq_m_n_s32(
170 // CHECK-NEXT: entry:
171 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
172 // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
173 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[A:%.*]], i64 0
174 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
175 // CHECK-NEXT: [[TMP2:%.*]] = select <4 x i1> [[TMP1]], <4 x i32> [[DOTSPLAT]], <4 x i32> [[INACTIVE:%.*]]
176 // CHECK-NEXT: ret <4 x i32> [[TMP2]]
177 //
test_vdupq_m_n_s32(int32x4_t inactive,int32_t a,mve_pred16_t p)178 int32x4_t test_vdupq_m_n_s32(int32x4_t inactive, int32_t a, mve_pred16_t p)
179 {
180 #ifdef POLYMORPHIC
181 return vdupq_m(inactive, a, p);
182 #else /* POLYMORPHIC */
183 return vdupq_m_n_s32(inactive, a, p);
184 #endif /* POLYMORPHIC */
185 }
186
187 // CHECK-LABEL: @test_vdupq_m_n_u8(
188 // CHECK-NEXT: entry:
189 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
190 // CHECK-NEXT: [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
191 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[A:%.*]], i64 0
192 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer
193 // CHECK-NEXT: [[TMP2:%.*]] = select <16 x i1> [[TMP1]], <16 x i8> [[DOTSPLAT]], <16 x i8> [[INACTIVE:%.*]]
194 // CHECK-NEXT: ret <16 x i8> [[TMP2]]
195 //
test_vdupq_m_n_u8(uint8x16_t inactive,uint8_t a,mve_pred16_t p)196 uint8x16_t test_vdupq_m_n_u8(uint8x16_t inactive, uint8_t a, mve_pred16_t p)
197 {
198 #ifdef POLYMORPHIC
199 return vdupq_m(inactive, a, p);
200 #else /* POLYMORPHIC */
201 return vdupq_m_n_u8(inactive, a, p);
202 #endif /* POLYMORPHIC */
203 }
204
205 // CHECK-LABEL: @test_vdupq_m_n_u16(
206 // CHECK-NEXT: entry:
207 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
208 // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
209 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[A:%.*]], i64 0
210 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer
211 // CHECK-NEXT: [[TMP2:%.*]] = select <8 x i1> [[TMP1]], <8 x i16> [[DOTSPLAT]], <8 x i16> [[INACTIVE:%.*]]
212 // CHECK-NEXT: ret <8 x i16> [[TMP2]]
213 //
test_vdupq_m_n_u16(uint16x8_t inactive,uint16_t a,mve_pred16_t p)214 uint16x8_t test_vdupq_m_n_u16(uint16x8_t inactive, uint16_t a, mve_pred16_t p)
215 {
216 #ifdef POLYMORPHIC
217 return vdupq_m(inactive, a, p);
218 #else /* POLYMORPHIC */
219 return vdupq_m_n_u16(inactive, a, p);
220 #endif /* POLYMORPHIC */
221 }
222
223 // CHECK-LABEL: @test_vdupq_m_n_u32(
224 // CHECK-NEXT: entry:
225 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
226 // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
227 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[A:%.*]], i64 0
228 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
229 // CHECK-NEXT: [[TMP2:%.*]] = select <4 x i1> [[TMP1]], <4 x i32> [[DOTSPLAT]], <4 x i32> [[INACTIVE:%.*]]
230 // CHECK-NEXT: ret <4 x i32> [[TMP2]]
231 //
test_vdupq_m_n_u32(uint32x4_t inactive,uint32_t a,mve_pred16_t p)232 uint32x4_t test_vdupq_m_n_u32(uint32x4_t inactive, uint32_t a, mve_pred16_t p)
233 {
234 #ifdef POLYMORPHIC
235 return vdupq_m(inactive, a, p);
236 #else /* POLYMORPHIC */
237 return vdupq_m_n_u32(inactive, a, p);
238 #endif /* POLYMORPHIC */
239 }
240
241 // CHECK-LABEL: @test_vdupq_x_n_f16(
242 // CHECK-NEXT: entry:
243 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
244 // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
245 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> poison, half [[A:%.*]], i64 0
246 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> poison, <8 x i32> zeroinitializer
247 // CHECK-NEXT: [[TMP2:%.*]] = select <8 x i1> [[TMP1]], <8 x half> [[DOTSPLAT]], <8 x half> undef
248 // CHECK-NEXT: ret <8 x half> [[TMP2]]
249 //
test_vdupq_x_n_f16(float16_t a,mve_pred16_t p)250 float16x8_t test_vdupq_x_n_f16(float16_t a, mve_pred16_t p)
251 {
252 return vdupq_x_n_f16(a, p);
253 }
254
255 // CHECK-LABEL: @test_vdupq_x_n_f32(
256 // CHECK-NEXT: entry:
257 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
258 // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
259 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> poison, float [[A:%.*]], i64 0
260 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> poison, <4 x i32> zeroinitializer
261 // CHECK-NEXT: [[TMP2:%.*]] = select <4 x i1> [[TMP1]], <4 x float> [[DOTSPLAT]], <4 x float> undef
262 // CHECK-NEXT: ret <4 x float> [[TMP2]]
263 //
test_vdupq_x_n_f32(float32_t a,mve_pred16_t p)264 float32x4_t test_vdupq_x_n_f32(float32_t a, mve_pred16_t p)
265 {
266 return vdupq_x_n_f32(a, p);
267 }
268
269 // CHECK-LABEL: @test_vdupq_x_n_s8(
270 // CHECK-NEXT: entry:
271 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
272 // CHECK-NEXT: [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
273 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[A:%.*]], i64 0
274 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer
275 // CHECK-NEXT: [[TMP2:%.*]] = select <16 x i1> [[TMP1]], <16 x i8> [[DOTSPLAT]], <16 x i8> undef
276 // CHECK-NEXT: ret <16 x i8> [[TMP2]]
277 //
test_vdupq_x_n_s8(int8_t a,mve_pred16_t p)278 int8x16_t test_vdupq_x_n_s8(int8_t a, mve_pred16_t p)
279 {
280 return vdupq_x_n_s8(a, p);
281 }
282
283 // CHECK-LABEL: @test_vdupq_x_n_s16(
284 // CHECK-NEXT: entry:
285 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
286 // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
287 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[A:%.*]], i64 0
288 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer
289 // CHECK-NEXT: [[TMP2:%.*]] = select <8 x i1> [[TMP1]], <8 x i16> [[DOTSPLAT]], <8 x i16> undef
290 // CHECK-NEXT: ret <8 x i16> [[TMP2]]
291 //
test_vdupq_x_n_s16(int16_t a,mve_pred16_t p)292 int16x8_t test_vdupq_x_n_s16(int16_t a, mve_pred16_t p)
293 {
294 return vdupq_x_n_s16(a, p);
295 }
296
297 // CHECK-LABEL: @test_vdupq_x_n_s32(
298 // CHECK-NEXT: entry:
299 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
300 // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
301 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[A:%.*]], i64 0
302 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
303 // CHECK-NEXT: [[TMP2:%.*]] = select <4 x i1> [[TMP1]], <4 x i32> [[DOTSPLAT]], <4 x i32> undef
304 // CHECK-NEXT: ret <4 x i32> [[TMP2]]
305 //
test_vdupq_x_n_s32(int32_t a,mve_pred16_t p)306 int32x4_t test_vdupq_x_n_s32(int32_t a, mve_pred16_t p)
307 {
308 return vdupq_x_n_s32(a, p);
309 }
310
311 // CHECK-LABEL: @test_vdupq_x_n_u8(
312 // CHECK-NEXT: entry:
313 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
314 // CHECK-NEXT: [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
315 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[A:%.*]], i64 0
316 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer
317 // CHECK-NEXT: [[TMP2:%.*]] = select <16 x i1> [[TMP1]], <16 x i8> [[DOTSPLAT]], <16 x i8> undef
318 // CHECK-NEXT: ret <16 x i8> [[TMP2]]
319 //
test_vdupq_x_n_u8(uint8_t a,mve_pred16_t p)320 uint8x16_t test_vdupq_x_n_u8(uint8_t a, mve_pred16_t p)
321 {
322 return vdupq_x_n_u8(a, p);
323 }
324
325 // CHECK-LABEL: @test_vdupq_x_n_u16(
326 // CHECK-NEXT: entry:
327 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
328 // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
329 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[A:%.*]], i64 0
330 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer
331 // CHECK-NEXT: [[TMP2:%.*]] = select <8 x i1> [[TMP1]], <8 x i16> [[DOTSPLAT]], <8 x i16> undef
332 // CHECK-NEXT: ret <8 x i16> [[TMP2]]
333 //
test_vdupq_x_n_u16(uint16_t a,mve_pred16_t p)334 uint16x8_t test_vdupq_x_n_u16(uint16_t a, mve_pred16_t p)
335 {
336 return vdupq_x_n_u16(a, p);
337 }
338
339 // CHECK-LABEL: @test_vdupq_x_n_u32(
340 // CHECK-NEXT: entry:
341 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
342 // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
343 // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[A:%.*]], i64 0
344 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
345 // CHECK-NEXT: [[TMP2:%.*]] = select <4 x i1> [[TMP1]], <4 x i32> [[DOTSPLAT]], <4 x i32> undef
346 // CHECK-NEXT: ret <4 x i32> [[TMP2]]
347 //
test_vdupq_x_n_u32(uint32_t a,mve_pred16_t p)348 uint32x4_t test_vdupq_x_n_u32(uint32_t a, mve_pred16_t p)
349 {
350 return vdupq_x_n_u32(a, p);
351 }
352
353