1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main -mattr=+mve.fp -verify-machineinstrs -o - %s | FileCheck %s
3 ; RUN: llc -mtriple=thumbv8.1m.main -mattr=+mve.fp -verify-machineinstrs -o - %s | FileCheck %s
5 define arm_aapcs_vfpcc <16 x i8> @test_vmvnq_m_s8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
6 ; CHECK-LABEL: test_vmvnq_m_s8:
7 ; CHECK: @ %bb.0: @ %entry
8 ; CHECK-NEXT: vmsr p0, r0
10 ; CHECK-NEXT: vmvnt q0, q1
13 %0 = zext i16 %p to i32
14 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
15 %2 = tail call <16 x i8> @llvm.arm.mve.mvn.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
19 define arm_aapcs_vfpcc <8 x i16> @test_vmvnq_m_s16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
20 ; CHECK-LABEL: test_vmvnq_m_s16:
21 ; CHECK: @ %bb.0: @ %entry
22 ; CHECK-NEXT: vmsr p0, r0
24 ; CHECK-NEXT: vmvnt q0, q1
27 %0 = zext i16 %p to i32
28 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
29 %2 = tail call <8 x i16> @llvm.arm.mve.mvn.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
33 define arm_aapcs_vfpcc <4 x i32> @test_vmvnq_m_s32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
34 ; CHECK-LABEL: test_vmvnq_m_s32:
35 ; CHECK: @ %bb.0: @ %entry
36 ; CHECK-NEXT: vmsr p0, r0
38 ; CHECK-NEXT: vmvnt q0, q1
41 %0 = zext i16 %p to i32
42 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
43 %2 = tail call <4 x i32> @llvm.arm.mve.mvn.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
47 define arm_aapcs_vfpcc <16 x i8> @test_vmvnq_m_u8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
48 ; CHECK-LABEL: test_vmvnq_m_u8:
49 ; CHECK: @ %bb.0: @ %entry
50 ; CHECK-NEXT: vmsr p0, r0
52 ; CHECK-NEXT: vmvnt q0, q1
55 %0 = zext i16 %p to i32
56 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
57 %2 = tail call <16 x i8> @llvm.arm.mve.mvn.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
61 define arm_aapcs_vfpcc <8 x i16> @test_vmvnq_m_u16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
62 ; CHECK-LABEL: test_vmvnq_m_u16:
63 ; CHECK: @ %bb.0: @ %entry
64 ; CHECK-NEXT: vmsr p0, r0
66 ; CHECK-NEXT: vmvnt q0, q1
69 %0 = zext i16 %p to i32
70 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
71 %2 = tail call <8 x i16> @llvm.arm.mve.mvn.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
75 define arm_aapcs_vfpcc <4 x i32> @test_vmvnq_m_u32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
76 ; CHECK-LABEL: test_vmvnq_m_u32:
77 ; CHECK: @ %bb.0: @ %entry
78 ; CHECK-NEXT: vmsr p0, r0
80 ; CHECK-NEXT: vmvnt q0, q1
83 %0 = zext i16 %p to i32
84 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
85 %2 = tail call <4 x i32> @llvm.arm.mve.mvn.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
89 define arm_aapcs_vfpcc <8 x half> @test_vnegq_m_f16(<8 x half> %inactive, <8 x half> %a, i16 zeroext %p) {
90 ; CHECK-LABEL: test_vnegq_m_f16:
91 ; CHECK: @ %bb.0: @ %entry
92 ; CHECK-NEXT: vmsr p0, r0
94 ; CHECK-NEXT: vnegt.f16 q0, q1
97 %0 = zext i16 %p to i32
98 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
99 %2 = tail call <8 x half> @llvm.arm.mve.neg.predicated.v8f16.v8i1(<8 x half> %a, <8 x i1> %1, <8 x half> %inactive)
103 define arm_aapcs_vfpcc <4 x float> @test_vnegq_m_f32(<4 x float> %inactive, <4 x float> %a, i16 zeroext %p) {
104 ; CHECK-LABEL: test_vnegq_m_f32:
105 ; CHECK: @ %bb.0: @ %entry
106 ; CHECK-NEXT: vmsr p0, r0
108 ; CHECK-NEXT: vnegt.f32 q0, q1
111 %0 = zext i16 %p to i32
112 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
113 %2 = tail call <4 x float> @llvm.arm.mve.neg.predicated.v4f32.v4i1(<4 x float> %a, <4 x i1> %1, <4 x float> %inactive)
117 define arm_aapcs_vfpcc <16 x i8> @test_vnegq_m_s8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
118 ; CHECK-LABEL: test_vnegq_m_s8:
119 ; CHECK: @ %bb.0: @ %entry
120 ; CHECK-NEXT: vmsr p0, r0
122 ; CHECK-NEXT: vnegt.s8 q0, q1
125 %0 = zext i16 %p to i32
126 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
127 %2 = tail call <16 x i8> @llvm.arm.mve.neg.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
131 define arm_aapcs_vfpcc <8 x i16> @test_vnegq_m_s16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
132 ; CHECK-LABEL: test_vnegq_m_s16:
133 ; CHECK: @ %bb.0: @ %entry
134 ; CHECK-NEXT: vmsr p0, r0
136 ; CHECK-NEXT: vnegt.s16 q0, q1
139 %0 = zext i16 %p to i32
140 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
141 %2 = tail call <8 x i16> @llvm.arm.mve.neg.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
145 define arm_aapcs_vfpcc <4 x i32> @test_vnegq_m_s32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
146 ; CHECK-LABEL: test_vnegq_m_s32:
147 ; CHECK: @ %bb.0: @ %entry
148 ; CHECK-NEXT: vmsr p0, r0
150 ; CHECK-NEXT: vnegt.s32 q0, q1
153 %0 = zext i16 %p to i32
154 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
155 %2 = tail call <4 x i32> @llvm.arm.mve.neg.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
159 define arm_aapcs_vfpcc <8 x half> @test_vabsq_m_f16(<8 x half> %inactive, <8 x half> %a, i16 zeroext %p) {
160 ; CHECK-LABEL: test_vabsq_m_f16:
161 ; CHECK: @ %bb.0: @ %entry
162 ; CHECK-NEXT: vmsr p0, r0
164 ; CHECK-NEXT: vabst.f16 q0, q1
167 %0 = zext i16 %p to i32
168 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
169 %2 = tail call <8 x half> @llvm.arm.mve.abs.predicated.v8f16.v8i1(<8 x half> %a, <8 x i1> %1, <8 x half> %inactive)
173 define arm_aapcs_vfpcc <4 x float> @test_vabsq_m_f32(<4 x float> %inactive, <4 x float> %a, i16 zeroext %p) {
174 ; CHECK-LABEL: test_vabsq_m_f32:
175 ; CHECK: @ %bb.0: @ %entry
176 ; CHECK-NEXT: vmsr p0, r0
178 ; CHECK-NEXT: vabst.f32 q0, q1
181 %0 = zext i16 %p to i32
182 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
183 %2 = tail call <4 x float> @llvm.arm.mve.abs.predicated.v4f32.v4i1(<4 x float> %a, <4 x i1> %1, <4 x float> %inactive)
187 define arm_aapcs_vfpcc <16 x i8> @test_vabsq_m_s8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
188 ; CHECK-LABEL: test_vabsq_m_s8:
189 ; CHECK: @ %bb.0: @ %entry
190 ; CHECK-NEXT: vmsr p0, r0
192 ; CHECK-NEXT: vabst.s8 q0, q1
195 %0 = zext i16 %p to i32
196 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
197 %2 = tail call <16 x i8> @llvm.arm.mve.abs.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
201 define arm_aapcs_vfpcc <8 x i16> @test_vabsq_m_s16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
202 ; CHECK-LABEL: test_vabsq_m_s16:
203 ; CHECK: @ %bb.0: @ %entry
204 ; CHECK-NEXT: vmsr p0, r0
206 ; CHECK-NEXT: vabst.s16 q0, q1
209 %0 = zext i16 %p to i32
210 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
211 %2 = tail call <8 x i16> @llvm.arm.mve.abs.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
215 define arm_aapcs_vfpcc <4 x i32> @test_vabsq_m_s32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
216 ; CHECK-LABEL: test_vabsq_m_s32:
217 ; CHECK: @ %bb.0: @ %entry
218 ; CHECK-NEXT: vmsr p0, r0
220 ; CHECK-NEXT: vabst.s32 q0, q1
223 %0 = zext i16 %p to i32
224 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
225 %2 = tail call <4 x i32> @llvm.arm.mve.abs.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
229 define arm_aapcs_vfpcc <16 x i8> @test_vqnegq_m_s8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
230 ; CHECK-LABEL: test_vqnegq_m_s8:
231 ; CHECK: @ %bb.0: @ %entry
232 ; CHECK-NEXT: vmsr p0, r0
234 ; CHECK-NEXT: vqnegt.s8 q0, q1
237 %0 = zext i16 %p to i32
238 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
239 %2 = tail call <16 x i8> @llvm.arm.mve.qneg.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
243 define arm_aapcs_vfpcc <8 x i16> @test_vqnegq_m_s16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
244 ; CHECK-LABEL: test_vqnegq_m_s16:
245 ; CHECK: @ %bb.0: @ %entry
246 ; CHECK-NEXT: vmsr p0, r0
248 ; CHECK-NEXT: vqnegt.s16 q0, q1
251 %0 = zext i16 %p to i32
252 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
253 %2 = tail call <8 x i16> @llvm.arm.mve.qneg.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
257 define arm_aapcs_vfpcc <4 x i32> @test_vqnegq_m_s32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
258 ; CHECK-LABEL: test_vqnegq_m_s32:
259 ; CHECK: @ %bb.0: @ %entry
260 ; CHECK-NEXT: vmsr p0, r0
262 ; CHECK-NEXT: vqnegt.s32 q0, q1
265 %0 = zext i16 %p to i32
266 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
267 %2 = tail call <4 x i32> @llvm.arm.mve.qneg.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
271 define arm_aapcs_vfpcc <16 x i8> @test_vqabsq_m_s8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
272 ; CHECK-LABEL: test_vqabsq_m_s8:
273 ; CHECK: @ %bb.0: @ %entry
274 ; CHECK-NEXT: vmsr p0, r0
276 ; CHECK-NEXT: vqabst.s8 q0, q1
279 %0 = zext i16 %p to i32
280 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
281 %2 = tail call <16 x i8> @llvm.arm.mve.qabs.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
285 define arm_aapcs_vfpcc <8 x i16> @test_vqabsq_m_s16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
286 ; CHECK-LABEL: test_vqabsq_m_s16:
287 ; CHECK: @ %bb.0: @ %entry
288 ; CHECK-NEXT: vmsr p0, r0
290 ; CHECK-NEXT: vqabst.s16 q0, q1
293 %0 = zext i16 %p to i32
294 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
295 %2 = tail call <8 x i16> @llvm.arm.mve.qabs.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
299 define arm_aapcs_vfpcc <4 x i32> @test_vqabsq_m_s32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
300 ; CHECK-LABEL: test_vqabsq_m_s32:
301 ; CHECK: @ %bb.0: @ %entry
302 ; CHECK-NEXT: vmsr p0, r0
304 ; CHECK-NEXT: vqabst.s32 q0, q1
307 %0 = zext i16 %p to i32
308 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
309 %2 = tail call <4 x i32> @llvm.arm.mve.qabs.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
313 declare <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32)
314 declare <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32)
315 declare <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32)
317 declare <16 x i8> @llvm.arm.mve.mvn.predicated.v16i8.v16i1(<16 x i8>, <16 x i1>, <16 x i8>)
318 declare <8 x i16> @llvm.arm.mve.mvn.predicated.v8i16.v8i1(<8 x i16>, <8 x i1>, <8 x i16>)
319 declare <4 x i32> @llvm.arm.mve.mvn.predicated.v4i32.v4i1(<4 x i32>, <4 x i1>, <4 x i32>)
320 declare <8 x half> @llvm.arm.mve.neg.predicated.v8f16.v8i1(<8 x half>, <8 x i1>, <8 x half>)
321 declare <4 x float> @llvm.arm.mve.neg.predicated.v4f32.v4i1(<4 x float>, <4 x i1>, <4 x float>)
322 declare <16 x i8> @llvm.arm.mve.neg.predicated.v16i8.v16i1(<16 x i8>, <16 x i1>, <16 x i8>)
323 declare <8 x i16> @llvm.arm.mve.neg.predicated.v8i16.v8i1(<8 x i16>, <8 x i1>, <8 x i16>)
324 declare <4 x i32> @llvm.arm.mve.neg.predicated.v4i32.v4i1(<4 x i32>, <4 x i1>, <4 x i32>)
325 declare <8 x half> @llvm.arm.mve.abs.predicated.v8f16.v8i1(<8 x half>, <8 x i1>, <8 x half>)
326 declare <4 x float> @llvm.arm.mve.abs.predicated.v4f32.v4i1(<4 x float>, <4 x i1>, <4 x float>)
327 declare <16 x i8> @llvm.arm.mve.abs.predicated.v16i8.v16i1(<16 x i8>, <16 x i1>, <16 x i8>)
328 declare <8 x i16> @llvm.arm.mve.abs.predicated.v8i16.v8i1(<8 x i16>, <8 x i1>, <8 x i16>)
329 declare <4 x i32> @llvm.arm.mve.abs.predicated.v4i32.v4i1(<4 x i32>, <4 x i1>, <4 x i32>)
330 declare <16 x i8> @llvm.arm.mve.qneg.predicated.v16i8.v16i1(<16 x i8>, <16 x i1>, <16 x i8>)
331 declare <8 x i16> @llvm.arm.mve.qneg.predicated.v8i16.v8i1(<8 x i16>, <8 x i1>, <8 x i16>)
332 declare <4 x i32> @llvm.arm.mve.qneg.predicated.v4i32.v4i1(<4 x i32>, <4 x i1>, <4 x i32>)
333 declare <16 x i8> @llvm.arm.mve.qabs.predicated.v16i8.v16i1(<16 x i8>, <16 x i1>, <16 x i8>)
334 declare <8 x i16> @llvm.arm.mve.qabs.predicated.v8i16.v8i1(<8 x i16>, <8 x i1>, <8 x i16>)
335 declare <4 x i32> @llvm.arm.mve.qabs.predicated.v4i32.v4i1(<4 x i32>, <4 x i1>, <4 x i32>)