Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / arm-mve-intrinsics / vmovn.c
blob64611bbf6e9b4f3a0f3f077d0582e44e623dfb09
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 -mfloat-abi hard -O0 -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck --check-prefix=LE %s
3 // RUN: %clang_cc1 -triple thumbebv8.1m.main-arm-none-eabi -target-feature +mve -mfloat-abi hard -O0 -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck --check-prefix=BE %s
4 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve -mfloat-abi hard -O0 -disable-O0-optnone -DPOLYMORPHIC -S -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck --check-prefix=LE %s
5 // RUN: %clang_cc1 -triple thumbebv8.1m.main-arm-none-eabi -target-feature +mve -mfloat-abi hard -O0 -disable-O0-optnone -DPOLYMORPHIC -S -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck --check-prefix=BE %s
7 // REQUIRES: aarch64-registered-target || arm-registered-target
9 #include <arm_mve.h>
11 // LE-LABEL: @test_vmovnbq_s16(
12 // LE-NEXT: entry:
13 // LE-NEXT: [[TMP0:%.*]] = shufflevector <16 x i8> [[A:%.*]], <16 x i8> poison, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
14 // LE-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16>
15 // LE-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[B:%.*]], <8 x i16> [[TMP1]], <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
16 // LE-NEXT: [[TMP3:%.*]] = trunc <16 x i16> [[TMP2]] to <16 x i8>
17 // LE-NEXT: ret <16 x i8> [[TMP3]]
19 // BE-LABEL: @test_vmovnbq_s16(
20 // BE-NEXT: entry:
21 // BE-NEXT: [[TMP0:%.*]] = shufflevector <16 x i8> [[A:%.*]], <16 x i8> poison, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
22 // BE-NEXT: [[TMP1:%.*]] = call <8 x i16> @llvm.arm.mve.vreinterpretq.v8i16.v16i8(<16 x i8> [[TMP0]])
23 // BE-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[B:%.*]], <8 x i16> [[TMP1]], <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
24 // BE-NEXT: [[TMP3:%.*]] = trunc <16 x i16> [[TMP2]] to <16 x i8>
25 // BE-NEXT: ret <16 x i8> [[TMP3]]
27 int8x16_t test_vmovnbq_s16(int8x16_t a, int16x8_t b)
29 #ifdef POLYMORPHIC
30 return vmovnbq(a, b);
31 #else /* POLYMORPHIC */
32 return vmovnbq_s16(a, b);
33 #endif /* POLYMORPHIC */
36 // LE-LABEL: @test_vmovnbq_s32(
37 // LE-NEXT: entry:
38 // LE-NEXT: [[TMP0:%.*]] = shufflevector <8 x i16> [[A:%.*]], <8 x i16> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
39 // LE-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <4 x i32>
40 // LE-NEXT: [[TMP2:%.*]] = shufflevector <4 x i32> [[B:%.*]], <4 x i32> [[TMP1]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
41 // LE-NEXT: [[TMP3:%.*]] = trunc <8 x i32> [[TMP2]] to <8 x i16>
42 // LE-NEXT: ret <8 x i16> [[TMP3]]
44 // BE-LABEL: @test_vmovnbq_s32(
45 // BE-NEXT: entry:
46 // BE-NEXT: [[TMP0:%.*]] = shufflevector <8 x i16> [[A:%.*]], <8 x i16> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
47 // BE-NEXT: [[TMP1:%.*]] = call <4 x i32> @llvm.arm.mve.vreinterpretq.v4i32.v8i16(<8 x i16> [[TMP0]])
48 // BE-NEXT: [[TMP2:%.*]] = shufflevector <4 x i32> [[B:%.*]], <4 x i32> [[TMP1]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
49 // BE-NEXT: [[TMP3:%.*]] = trunc <8 x i32> [[TMP2]] to <8 x i16>
50 // BE-NEXT: ret <8 x i16> [[TMP3]]
52 int16x8_t test_vmovnbq_s32(int16x8_t a, int32x4_t b)
54 #ifdef POLYMORPHIC
55 return vmovnbq(a, b);
56 #else /* POLYMORPHIC */
57 return vmovnbq_s32(a, b);
58 #endif /* POLYMORPHIC */
61 // LE-LABEL: @test_vmovnbq_u16(
62 // LE-NEXT: entry:
63 // LE-NEXT: [[TMP0:%.*]] = shufflevector <16 x i8> [[A:%.*]], <16 x i8> poison, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
64 // LE-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16>
65 // LE-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[B:%.*]], <8 x i16> [[TMP1]], <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
66 // LE-NEXT: [[TMP3:%.*]] = trunc <16 x i16> [[TMP2]] to <16 x i8>
67 // LE-NEXT: ret <16 x i8> [[TMP3]]
69 // BE-LABEL: @test_vmovnbq_u16(
70 // BE-NEXT: entry:
71 // BE-NEXT: [[TMP0:%.*]] = shufflevector <16 x i8> [[A:%.*]], <16 x i8> poison, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
72 // BE-NEXT: [[TMP1:%.*]] = call <8 x i16> @llvm.arm.mve.vreinterpretq.v8i16.v16i8(<16 x i8> [[TMP0]])
73 // BE-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[B:%.*]], <8 x i16> [[TMP1]], <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
74 // BE-NEXT: [[TMP3:%.*]] = trunc <16 x i16> [[TMP2]] to <16 x i8>
75 // BE-NEXT: ret <16 x i8> [[TMP3]]
77 uint8x16_t test_vmovnbq_u16(uint8x16_t a, uint16x8_t b)
79 #ifdef POLYMORPHIC
80 return vmovnbq(a, b);
81 #else /* POLYMORPHIC */
82 return vmovnbq_u16(a, b);
83 #endif /* POLYMORPHIC */
86 // LE-LABEL: @test_vmovnbq_u32(
87 // LE-NEXT: entry:
88 // LE-NEXT: [[TMP0:%.*]] = shufflevector <8 x i16> [[A:%.*]], <8 x i16> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
89 // LE-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> [[TMP0]] to <4 x i32>
90 // LE-NEXT: [[TMP2:%.*]] = shufflevector <4 x i32> [[B:%.*]], <4 x i32> [[TMP1]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
91 // LE-NEXT: [[TMP3:%.*]] = trunc <8 x i32> [[TMP2]] to <8 x i16>
92 // LE-NEXT: ret <8 x i16> [[TMP3]]
94 // BE-LABEL: @test_vmovnbq_u32(
95 // BE-NEXT: entry:
96 // BE-NEXT: [[TMP0:%.*]] = shufflevector <8 x i16> [[A:%.*]], <8 x i16> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
97 // BE-NEXT: [[TMP1:%.*]] = call <4 x i32> @llvm.arm.mve.vreinterpretq.v4i32.v8i16(<8 x i16> [[TMP0]])
98 // BE-NEXT: [[TMP2:%.*]] = shufflevector <4 x i32> [[B:%.*]], <4 x i32> [[TMP1]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
99 // BE-NEXT: [[TMP3:%.*]] = trunc <8 x i32> [[TMP2]] to <8 x i16>
100 // BE-NEXT: ret <8 x i16> [[TMP3]]
102 uint16x8_t test_vmovnbq_u32(uint16x8_t a, uint32x4_t b)
104 #ifdef POLYMORPHIC
105 return vmovnbq(a, b);
106 #else /* POLYMORPHIC */
107 return vmovnbq_u32(a, b);
108 #endif /* POLYMORPHIC */
111 // LE-LABEL: @test_vmovntq_s16(
112 // LE-NEXT: entry:
113 // LE-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A:%.*]] to <8 x i16>
114 // LE-NEXT: [[TMP1:%.*]] = shufflevector <8 x i16> [[TMP0]], <8 x i16> [[B:%.*]], <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
115 // LE-NEXT: [[TMP2:%.*]] = trunc <16 x i16> [[TMP1]] to <16 x i8>
116 // LE-NEXT: ret <16 x i8> [[TMP2]]
118 // BE-LABEL: @test_vmovntq_s16(
119 // BE-NEXT: entry:
120 // BE-NEXT: [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vreinterpretq.v8i16.v16i8(<16 x i8> [[A:%.*]])
121 // BE-NEXT: [[TMP1:%.*]] = shufflevector <8 x i16> [[TMP0]], <8 x i16> [[B:%.*]], <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
122 // BE-NEXT: [[TMP2:%.*]] = trunc <16 x i16> [[TMP1]] to <16 x i8>
123 // BE-NEXT: ret <16 x i8> [[TMP2]]
125 int8x16_t test_vmovntq_s16(int8x16_t a, int16x8_t b)
127 #ifdef POLYMORPHIC
128 return vmovntq(a, b);
129 #else /* POLYMORPHIC */
130 return vmovntq_s16(a, b);
131 #endif /* POLYMORPHIC */
134 // LE-LABEL: @test_vmovntq_s32(
135 // LE-NEXT: entry:
136 // LE-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A:%.*]] to <4 x i32>
137 // LE-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[TMP0]], <4 x i32> [[B:%.*]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
138 // LE-NEXT: [[TMP2:%.*]] = trunc <8 x i32> [[TMP1]] to <8 x i16>
139 // LE-NEXT: ret <8 x i16> [[TMP2]]
141 // BE-LABEL: @test_vmovntq_s32(
142 // BE-NEXT: entry:
143 // BE-NEXT: [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vreinterpretq.v4i32.v8i16(<8 x i16> [[A:%.*]])
144 // BE-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[TMP0]], <4 x i32> [[B:%.*]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
145 // BE-NEXT: [[TMP2:%.*]] = trunc <8 x i32> [[TMP1]] to <8 x i16>
146 // BE-NEXT: ret <8 x i16> [[TMP2]]
148 int16x8_t test_vmovntq_s32(int16x8_t a, int32x4_t b)
150 #ifdef POLYMORPHIC
151 return vmovntq(a, b);
152 #else /* POLYMORPHIC */
153 return vmovntq_s32(a, b);
154 #endif /* POLYMORPHIC */
157 // LE-LABEL: @test_vmovntq_u16(
158 // LE-NEXT: entry:
159 // LE-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A:%.*]] to <8 x i16>
160 // LE-NEXT: [[TMP1:%.*]] = shufflevector <8 x i16> [[TMP0]], <8 x i16> [[B:%.*]], <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
161 // LE-NEXT: [[TMP2:%.*]] = trunc <16 x i16> [[TMP1]] to <16 x i8>
162 // LE-NEXT: ret <16 x i8> [[TMP2]]
164 // BE-LABEL: @test_vmovntq_u16(
165 // BE-NEXT: entry:
166 // BE-NEXT: [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vreinterpretq.v8i16.v16i8(<16 x i8> [[A:%.*]])
167 // BE-NEXT: [[TMP1:%.*]] = shufflevector <8 x i16> [[TMP0]], <8 x i16> [[B:%.*]], <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
168 // BE-NEXT: [[TMP2:%.*]] = trunc <16 x i16> [[TMP1]] to <16 x i8>
169 // BE-NEXT: ret <16 x i8> [[TMP2]]
171 uint8x16_t test_vmovntq_u16(uint8x16_t a, uint16x8_t b)
173 #ifdef POLYMORPHIC
174 return vmovntq(a, b);
175 #else /* POLYMORPHIC */
176 return vmovntq_u16(a, b);
177 #endif /* POLYMORPHIC */
180 // LE-LABEL: @test_vmovntq_u32(
181 // LE-NEXT: entry:
182 // LE-NEXT: [[TMP0:%.*]] = bitcast <8 x i16> [[A:%.*]] to <4 x i32>
183 // LE-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[TMP0]], <4 x i32> [[B:%.*]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
184 // LE-NEXT: [[TMP2:%.*]] = trunc <8 x i32> [[TMP1]] to <8 x i16>
185 // LE-NEXT: ret <8 x i16> [[TMP2]]
187 // BE-LABEL: @test_vmovntq_u32(
188 // BE-NEXT: entry:
189 // BE-NEXT: [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vreinterpretq.v4i32.v8i16(<8 x i16> [[A:%.*]])
190 // BE-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[TMP0]], <4 x i32> [[B:%.*]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
191 // BE-NEXT: [[TMP2:%.*]] = trunc <8 x i32> [[TMP1]] to <8 x i16>
192 // BE-NEXT: ret <8 x i16> [[TMP2]]
194 uint16x8_t test_vmovntq_u32(uint16x8_t a, uint32x4_t b)
196 #ifdef POLYMORPHIC
197 return vmovntq(a, b);
198 #else /* POLYMORPHIC */
199 return vmovntq_u32(a, b);
200 #endif /* POLYMORPHIC */
203 // LE-LABEL: @test_vmovnbq_m_s16(
204 // LE-NEXT: entry:
205 // LE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
206 // LE-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
207 // LE-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vmovn.predicated.v16i8.v8i16.v8i1(<16 x i8> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, <8 x i1> [[TMP1]])
208 // LE-NEXT: ret <16 x i8> [[TMP2]]
210 // BE-LABEL: @test_vmovnbq_m_s16(
211 // BE-NEXT: entry:
212 // BE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
213 // BE-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
214 // BE-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vmovn.predicated.v16i8.v8i16.v8i1(<16 x i8> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, <8 x i1> [[TMP1]])
215 // BE-NEXT: ret <16 x i8> [[TMP2]]
217 int8x16_t test_vmovnbq_m_s16(int8x16_t a, int16x8_t b, mve_pred16_t p)
219 #ifdef POLYMORPHIC
220 return vmovnbq_m(a, b, p);
221 #else /* POLYMORPHIC */
222 return vmovnbq_m_s16(a, b, p);
223 #endif /* POLYMORPHIC */
226 // LE-LABEL: @test_vmovnbq_m_s32(
227 // LE-NEXT: entry:
228 // LE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
229 // LE-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
230 // LE-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vmovn.predicated.v8i16.v4i32.v4i1(<8 x i16> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, <4 x i1> [[TMP1]])
231 // LE-NEXT: ret <8 x i16> [[TMP2]]
233 // BE-LABEL: @test_vmovnbq_m_s32(
234 // BE-NEXT: entry:
235 // BE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
236 // BE-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
237 // BE-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vmovn.predicated.v8i16.v4i32.v4i1(<8 x i16> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, <4 x i1> [[TMP1]])
238 // BE-NEXT: ret <8 x i16> [[TMP2]]
240 int16x8_t test_vmovnbq_m_s32(int16x8_t a, int32x4_t b, mve_pred16_t p)
242 #ifdef POLYMORPHIC
243 return vmovnbq_m(a, b, p);
244 #else /* POLYMORPHIC */
245 return vmovnbq_m_s32(a, b, p);
246 #endif /* POLYMORPHIC */
249 // LE-LABEL: @test_vmovnbq_m_u16(
250 // LE-NEXT: entry:
251 // LE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
252 // LE-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
253 // LE-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vmovn.predicated.v16i8.v8i16.v8i1(<16 x i8> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, <8 x i1> [[TMP1]])
254 // LE-NEXT: ret <16 x i8> [[TMP2]]
256 // BE-LABEL: @test_vmovnbq_m_u16(
257 // BE-NEXT: entry:
258 // BE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
259 // BE-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
260 // BE-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vmovn.predicated.v16i8.v8i16.v8i1(<16 x i8> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, <8 x i1> [[TMP1]])
261 // BE-NEXT: ret <16 x i8> [[TMP2]]
263 uint8x16_t test_vmovnbq_m_u16(uint8x16_t a, uint16x8_t b, mve_pred16_t p)
265 #ifdef POLYMORPHIC
266 return vmovnbq_m(a, b, p);
267 #else /* POLYMORPHIC */
268 return vmovnbq_m_u16(a, b, p);
269 #endif /* POLYMORPHIC */
272 // LE-LABEL: @test_vmovnbq_m_u32(
273 // LE-NEXT: entry:
274 // LE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
275 // LE-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
276 // LE-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vmovn.predicated.v8i16.v4i32.v4i1(<8 x i16> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, <4 x i1> [[TMP1]])
277 // LE-NEXT: ret <8 x i16> [[TMP2]]
279 // BE-LABEL: @test_vmovnbq_m_u32(
280 // BE-NEXT: entry:
281 // BE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
282 // BE-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
283 // BE-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vmovn.predicated.v8i16.v4i32.v4i1(<8 x i16> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, <4 x i1> [[TMP1]])
284 // BE-NEXT: ret <8 x i16> [[TMP2]]
286 uint16x8_t test_vmovnbq_m_u32(uint16x8_t a, uint32x4_t b, mve_pred16_t p)
288 #ifdef POLYMORPHIC
289 return vmovnbq_m(a, b, p);
290 #else /* POLYMORPHIC */
291 return vmovnbq_m_u32(a, b, p);
292 #endif /* POLYMORPHIC */
295 // LE-LABEL: @test_vmovntq_m_s16(
296 // LE-NEXT: entry:
297 // LE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
298 // LE-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
299 // LE-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vmovn.predicated.v16i8.v8i16.v8i1(<16 x i8> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, <8 x i1> [[TMP1]])
300 // LE-NEXT: ret <16 x i8> [[TMP2]]
302 // BE-LABEL: @test_vmovntq_m_s16(
303 // BE-NEXT: entry:
304 // BE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
305 // BE-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
306 // BE-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vmovn.predicated.v16i8.v8i16.v8i1(<16 x i8> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, <8 x i1> [[TMP1]])
307 // BE-NEXT: ret <16 x i8> [[TMP2]]
309 int8x16_t test_vmovntq_m_s16(int8x16_t a, int16x8_t b, mve_pred16_t p)
311 #ifdef POLYMORPHIC
312 return vmovntq_m(a, b, p);
313 #else /* POLYMORPHIC */
314 return vmovntq_m_s16(a, b, p);
315 #endif /* POLYMORPHIC */
318 // LE-LABEL: @test_vmovntq_m_s32(
319 // LE-NEXT: entry:
320 // LE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
321 // LE-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
322 // LE-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vmovn.predicated.v8i16.v4i32.v4i1(<8 x i16> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, <4 x i1> [[TMP1]])
323 // LE-NEXT: ret <8 x i16> [[TMP2]]
325 // BE-LABEL: @test_vmovntq_m_s32(
326 // BE-NEXT: entry:
327 // BE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
328 // BE-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
329 // BE-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vmovn.predicated.v8i16.v4i32.v4i1(<8 x i16> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, <4 x i1> [[TMP1]])
330 // BE-NEXT: ret <8 x i16> [[TMP2]]
332 int16x8_t test_vmovntq_m_s32(int16x8_t a, int32x4_t b, mve_pred16_t p)
334 #ifdef POLYMORPHIC
335 return vmovntq_m(a, b, p);
336 #else /* POLYMORPHIC */
337 return vmovntq_m_s32(a, b, p);
338 #endif /* POLYMORPHIC */
341 // LE-LABEL: @test_vmovntq_m_u16(
342 // LE-NEXT: entry:
343 // LE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
344 // LE-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
345 // LE-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vmovn.predicated.v16i8.v8i16.v8i1(<16 x i8> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, <8 x i1> [[TMP1]])
346 // LE-NEXT: ret <16 x i8> [[TMP2]]
348 // BE-LABEL: @test_vmovntq_m_u16(
349 // BE-NEXT: entry:
350 // BE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
351 // BE-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
352 // BE-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vmovn.predicated.v16i8.v8i16.v8i1(<16 x i8> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, <8 x i1> [[TMP1]])
353 // BE-NEXT: ret <16 x i8> [[TMP2]]
355 uint8x16_t test_vmovntq_m_u16(uint8x16_t a, uint16x8_t b, mve_pred16_t p)
357 #ifdef POLYMORPHIC
358 return vmovntq_m(a, b, p);
359 #else /* POLYMORPHIC */
360 return vmovntq_m_u16(a, b, p);
361 #endif /* POLYMORPHIC */
364 // LE-LABEL: @test_vmovntq_m_u32(
365 // LE-NEXT: entry:
366 // LE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
367 // LE-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
368 // LE-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vmovn.predicated.v8i16.v4i32.v4i1(<8 x i16> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, <4 x i1> [[TMP1]])
369 // LE-NEXT: ret <8 x i16> [[TMP2]]
371 // BE-LABEL: @test_vmovntq_m_u32(
372 // BE-NEXT: entry:
373 // BE-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
374 // BE-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
375 // BE-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vmovn.predicated.v8i16.v4i32.v4i1(<8 x i16> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, <4 x i1> [[TMP1]])
376 // BE-NEXT: ret <8 x i16> [[TMP2]]
378 uint16x8_t test_vmovntq_m_u32(uint16x8_t a, uint32x4_t b, mve_pred16_t p)
380 #ifdef POLYMORPHIC
381 return vmovntq_m(a, b, p);
382 #else /* POLYMORPHIC */
383 return vmovntq_m_u32(a, b, p);
384 #endif /* POLYMORPHIC */