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
4 define arm_aapcs_vfpcc <16 x i8> @test_vclsq_m_s8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
5 ; CHECK-LABEL: test_vclsq_m_s8:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vmsr p0, r0
9 ; CHECK-NEXT: vclst.s8 q0, q1
12 %0 = zext i16 %p to i32
13 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
14 %2 = tail call <16 x i8> @llvm.arm.mve.cls.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
18 define arm_aapcs_vfpcc <8 x i16> @test_vclsq_m_s16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
19 ; CHECK-LABEL: test_vclsq_m_s16:
20 ; CHECK: @ %bb.0: @ %entry
21 ; CHECK-NEXT: vmsr p0, r0
23 ; CHECK-NEXT: vclst.s16 q0, q1
26 %0 = zext i16 %p to i32
27 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
28 %2 = tail call <8 x i16> @llvm.arm.mve.cls.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
32 define arm_aapcs_vfpcc <4 x i32> @test_vclsq_m_s32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
33 ; CHECK-LABEL: test_vclsq_m_s32:
34 ; CHECK: @ %bb.0: @ %entry
35 ; CHECK-NEXT: vmsr p0, r0
37 ; CHECK-NEXT: vclst.s32 q0, q1
40 %0 = zext i16 %p to i32
41 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
42 %2 = tail call <4 x i32> @llvm.arm.mve.cls.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
46 define arm_aapcs_vfpcc <16 x i8> @test_vclzq_m_s8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
47 ; CHECK-LABEL: test_vclzq_m_s8:
48 ; CHECK: @ %bb.0: @ %entry
49 ; CHECK-NEXT: vmsr p0, r0
51 ; CHECK-NEXT: vclzt.i8 q0, q1
54 %0 = zext i16 %p to i32
55 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
56 %2 = tail call <16 x i8> @llvm.arm.mve.clz.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
60 define arm_aapcs_vfpcc <8 x i16> @test_vclzq_m_s16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
61 ; CHECK-LABEL: test_vclzq_m_s16:
62 ; CHECK: @ %bb.0: @ %entry
63 ; CHECK-NEXT: vmsr p0, r0
65 ; CHECK-NEXT: vclzt.i16 q0, q1
68 %0 = zext i16 %p to i32
69 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
70 %2 = tail call <8 x i16> @llvm.arm.mve.clz.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
74 define arm_aapcs_vfpcc <4 x i32> @test_vclzq_m_s32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
75 ; CHECK-LABEL: test_vclzq_m_s32:
76 ; CHECK: @ %bb.0: @ %entry
77 ; CHECK-NEXT: vmsr p0, r0
79 ; CHECK-NEXT: vclzt.i32 q0, q1
82 %0 = zext i16 %p to i32
83 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
84 %2 = tail call <4 x i32> @llvm.arm.mve.clz.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
88 define arm_aapcs_vfpcc <16 x i8> @test_vclzq_m_u8(<16 x i8> %inactive, <16 x i8> %a, i16 zeroext %p) {
89 ; CHECK-LABEL: test_vclzq_m_u8:
90 ; CHECK: @ %bb.0: @ %entry
91 ; CHECK-NEXT: vmsr p0, r0
93 ; CHECK-NEXT: vclzt.i8 q0, q1
96 %0 = zext i16 %p to i32
97 %1 = tail call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
98 %2 = tail call <16 x i8> @llvm.arm.mve.clz.predicated.v16i8.v16i1(<16 x i8> %a, <16 x i1> %1, <16 x i8> %inactive)
102 define arm_aapcs_vfpcc <8 x i16> @test_vclzq_m_u16(<8 x i16> %inactive, <8 x i16> %a, i16 zeroext %p) {
103 ; CHECK-LABEL: test_vclzq_m_u16:
104 ; CHECK: @ %bb.0: @ %entry
105 ; CHECK-NEXT: vmsr p0, r0
107 ; CHECK-NEXT: vclzt.i16 q0, q1
110 %0 = zext i16 %p to i32
111 %1 = tail call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
112 %2 = tail call <8 x i16> @llvm.arm.mve.clz.predicated.v8i16.v8i1(<8 x i16> %a, <8 x i1> %1, <8 x i16> %inactive)
116 define arm_aapcs_vfpcc <4 x i32> @test_vclzq_m_u32(<4 x i32> %inactive, <4 x i32> %a, i16 zeroext %p) {
117 ; CHECK-LABEL: test_vclzq_m_u32:
118 ; CHECK: @ %bb.0: @ %entry
119 ; CHECK-NEXT: vmsr p0, r0
121 ; CHECK-NEXT: vclzt.i32 q0, q1
124 %0 = zext i16 %p to i32
125 %1 = tail call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
126 %2 = tail call <4 x i32> @llvm.arm.mve.clz.predicated.v4i32.v4i1(<4 x i32> %a, <4 x i1> %1, <4 x i32> %inactive)
130 declare <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32)
131 declare <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32)
132 declare <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32)
133 declare <16 x i8> @llvm.arm.mve.cls.predicated.v16i8.v16i1(<16 x i8>, <16 x i1>, <16 x i8>)
134 declare <8 x i16> @llvm.arm.mve.cls.predicated.v8i16.v8i1(<8 x i16>, <8 x i1>, <8 x i16>)
135 declare <4 x i32> @llvm.arm.mve.cls.predicated.v4i32.v4i1(<4 x i32>, <4 x i1>, <4 x i32>)
136 declare <16 x i8> @llvm.arm.mve.clz.predicated.v16i8.v16i1(<16 x i8>, <16 x i1>, <16 x i8>)
137 declare <8 x i16> @llvm.arm.mve.clz.predicated.v8i16.v8i1(<8 x i16>, <8 x i1>, <8 x i16>)
138 declare <4 x i32> @llvm.arm.mve.clz.predicated.v4i32.v4i1(<4 x i32>, <4 x i1>, <4 x i32>)