1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main -mattr=+mve -verify-machineinstrs -o - %s | FileCheck %s
4 declare <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32)
5 declare <2 x i1> @llvm.arm.mve.pred.i2v.v2i1(i32)
7 declare <4 x i32> @llvm.arm.mve.vqdmull.v4i32.v8i16(<8 x i16>, <8 x i16>, i32)
8 declare <2 x i64> @llvm.arm.mve.vqdmull.v2i64.v4i32(<4 x i32>, <4 x i32>, i32)
9 declare <4 x i32> @llvm.arm.mve.vqdmull.predicated.v4i32.v8i16.v4i1(<8 x i16>, <8 x i16>, i32, <4 x i1>, <4 x i32>)
10 declare <2 x i64> @llvm.arm.mve.vqdmull.predicated.v2i64.v4i32.v2i1(<4 x i32>, <4 x i32>, i32, <2 x i1>, <2 x i64>)
12 define arm_aapcs_vfpcc <4 x i32> @test_vqdmullbq_s16(<8 x i16> %a, <8 x i16> %b) {
13 ; CHECK-LABEL: test_vqdmullbq_s16:
14 ; CHECK: @ %bb.0: @ %entry
15 ; CHECK-NEXT: vqdmullb.s16 q0, q0, q1
18 %0 = call <4 x i32> @llvm.arm.mve.vqdmull.v4i32.v8i16(<8 x i16> %a, <8 x i16> %b, i32 0)
22 define arm_aapcs_vfpcc <2 x i64> @test_vqdmullbq_s32(<4 x i32> %a, <4 x i32> %b) {
23 ; CHECK-LABEL: test_vqdmullbq_s32:
24 ; CHECK: @ %bb.0: @ %entry
25 ; CHECK-NEXT: vqdmullb.s32 q2, q0, q1
26 ; CHECK-NEXT: vmov q0, q2
29 %0 = call <2 x i64> @llvm.arm.mve.vqdmull.v2i64.v4i32(<4 x i32> %a, <4 x i32> %b, i32 0)
33 define arm_aapcs_vfpcc <4 x i32> @test_vqdmullbq_m_s16(<4 x i32> %inactive, <8 x i16> %a, <8 x i16> %b, i16 zeroext %p) {
34 ; CHECK-LABEL: test_vqdmullbq_m_s16:
35 ; CHECK: @ %bb.0: @ %entry
36 ; CHECK-NEXT: vmsr p0, r0
38 ; CHECK-NEXT: vqdmullbt.s16 q0, q1, q2
41 %0 = zext i16 %p to i32
42 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
43 %2 = call <4 x i32> @llvm.arm.mve.vqdmull.predicated.v4i32.v8i16.v4i1(<8 x i16> %a, <8 x i16> %b, i32 0, <4 x i1> %1, <4 x i32> %inactive)
47 define arm_aapcs_vfpcc <2 x i64> @test_vqdmullbq_m_s32(<2 x i64> %inactive, <4 x i32> %a, <4 x i32> %b, i16 zeroext %p) {
48 ; CHECK-LABEL: test_vqdmullbq_m_s32:
49 ; CHECK: @ %bb.0: @ %entry
50 ; CHECK-NEXT: vmsr p0, r0
52 ; CHECK-NEXT: vqdmullbt.s32 q0, q1, q2
55 %0 = zext i16 %p to i32
56 %1 = call <2 x i1> @llvm.arm.mve.pred.i2v.v2i1(i32 %0)
57 %2 = call <2 x i64> @llvm.arm.mve.vqdmull.predicated.v2i64.v4i32.v2i1(<4 x i32> %a, <4 x i32> %b, i32 0, <2 x i1> %1, <2 x i64> %inactive)
61 define arm_aapcs_vfpcc <4 x i32> @test_vqdmullbq_n_s16(<8 x i16> %a, i16 signext %b) {
62 ; CHECK-LABEL: test_vqdmullbq_n_s16:
63 ; CHECK: @ %bb.0: @ %entry
64 ; CHECK-NEXT: vqdmullb.s16 q0, q0, r0
67 %.splatinsert = insertelement <8 x i16> undef, i16 %b, i32 0
68 %.splat = shufflevector <8 x i16> %.splatinsert, <8 x i16> undef, <8 x i32> zeroinitializer
69 %0 = call <4 x i32> @llvm.arm.mve.vqdmull.v4i32.v8i16(<8 x i16> %a, <8 x i16> %.splat, i32 0)
73 define arm_aapcs_vfpcc <2 x i64> @test_vqdmullbq_n_s32(<4 x i32> %a, i32 %b) #0 {
74 ; CHECK-LABEL: test_vqdmullbq_n_s32:
75 ; CHECK: @ %bb.0: @ %entry
76 ; CHECK-NEXT: vqdmullb.s32 q1, q0, r0
77 ; CHECK-NEXT: vmov q0, q1
80 %.splatinsert = insertelement <4 x i32> undef, i32 %b, i32 0
81 %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> undef, <4 x i32> zeroinitializer
82 %0 = call <2 x i64> @llvm.arm.mve.vqdmull.v2i64.v4i32(<4 x i32> %a, <4 x i32> %.splat, i32 0)
86 define arm_aapcs_vfpcc <4 x i32> @test_vqdmullbq_m_n_s16(<4 x i32> %inactive, <8 x i16> %a, i16 signext %b, i16 zeroext %p) {
87 ; CHECK-LABEL: test_vqdmullbq_m_n_s16:
88 ; CHECK: @ %bb.0: @ %entry
89 ; CHECK-NEXT: vmsr p0, r1
91 ; CHECK-NEXT: vqdmullbt.s16 q0, q1, r0
94 %.splatinsert = insertelement <8 x i16> undef, i16 %b, i32 0
95 %.splat = shufflevector <8 x i16> %.splatinsert, <8 x i16> undef, <8 x i32> zeroinitializer
96 %0 = zext i16 %p to i32
97 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
98 %2 = call <4 x i32> @llvm.arm.mve.vqdmull.predicated.v4i32.v8i16.v4i1(<8 x i16> %a, <8 x i16> %.splat, i32 0, <4 x i1> %1, <4 x i32> %inactive)
102 define arm_aapcs_vfpcc <2 x i64> @test_vqdmullbq_m_n_s32(<2 x i64> %inactive, <4 x i32> %a, i32 %b, i16 zeroext %p) {
103 ; CHECK-LABEL: test_vqdmullbq_m_n_s32:
104 ; CHECK: @ %bb.0: @ %entry
105 ; CHECK-NEXT: vmsr p0, r1
107 ; CHECK-NEXT: vqdmullbt.s32 q0, q1, r0
110 %.splatinsert = insertelement <4 x i32> undef, i32 %b, i32 0
111 %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> undef, <4 x i32> zeroinitializer
112 %0 = zext i16 %p to i32
113 %1 = call <2 x i1> @llvm.arm.mve.pred.i2v.v2i1(i32 %0)
114 %2 = call <2 x i64> @llvm.arm.mve.vqdmull.predicated.v2i64.v4i32.v2i1(<4 x i32> %a, <4 x i32> %.splat, i32 0, <2 x i1> %1, <2 x i64> %inactive)
118 define arm_aapcs_vfpcc <4 x i32> @test_vqdmulltq_s16(<8 x i16> %a, <8 x i16> %b) {
119 ; CHECK-LABEL: test_vqdmulltq_s16:
120 ; CHECK: @ %bb.0: @ %entry
121 ; CHECK-NEXT: vqdmullt.s16 q0, q0, q1
124 %0 = call <4 x i32> @llvm.arm.mve.vqdmull.v4i32.v8i16(<8 x i16> %a, <8 x i16> %b, i32 1)
128 define arm_aapcs_vfpcc <2 x i64> @test_vqdmulltq_s32(<4 x i32> %a, <4 x i32> %b) {
129 ; CHECK-LABEL: test_vqdmulltq_s32:
130 ; CHECK: @ %bb.0: @ %entry
131 ; CHECK-NEXT: vqdmullt.s32 q2, q0, q1
132 ; CHECK-NEXT: vmov q0, q2
135 %0 = call <2 x i64> @llvm.arm.mve.vqdmull.v2i64.v4i32(<4 x i32> %a, <4 x i32> %b, i32 1)
139 define arm_aapcs_vfpcc <4 x i32> @test_vqdmulltq_m_s16(<4 x i32> %inactive, <8 x i16> %a, <8 x i16> %b, i16 zeroext %p) {
140 ; CHECK-LABEL: test_vqdmulltq_m_s16:
141 ; CHECK: @ %bb.0: @ %entry
142 ; CHECK-NEXT: vmsr p0, r0
144 ; CHECK-NEXT: vqdmulltt.s16 q0, q1, q2
147 %0 = zext i16 %p to i32
148 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
149 %2 = call <4 x i32> @llvm.arm.mve.vqdmull.predicated.v4i32.v8i16.v4i1(<8 x i16> %a, <8 x i16> %b, i32 1, <4 x i1> %1, <4 x i32> %inactive)
153 define arm_aapcs_vfpcc <2 x i64> @test_vqdmulltq_m_s32(<2 x i64> %inactive, <4 x i32> %a, <4 x i32> %b, i16 zeroext %p) {
154 ; CHECK-LABEL: test_vqdmulltq_m_s32:
155 ; CHECK: @ %bb.0: @ %entry
156 ; CHECK-NEXT: vmsr p0, r0
158 ; CHECK-NEXT: vqdmulltt.s32 q0, q1, q2
161 %0 = zext i16 %p to i32
162 %1 = call <2 x i1> @llvm.arm.mve.pred.i2v.v2i1(i32 %0)
163 %2 = call <2 x i64> @llvm.arm.mve.vqdmull.predicated.v2i64.v4i32.v2i1(<4 x i32> %a, <4 x i32> %b, i32 1, <2 x i1> %1, <2 x i64> %inactive)
167 define arm_aapcs_vfpcc <4 x i32> @test_vqdmulltq_n_s16(<8 x i16> %a, i16 signext %b) {
168 ; CHECK-LABEL: test_vqdmulltq_n_s16:
169 ; CHECK: @ %bb.0: @ %entry
170 ; CHECK-NEXT: vqdmullt.s16 q0, q0, r0
173 %.splatinsert = insertelement <8 x i16> undef, i16 %b, i32 0
174 %.splat = shufflevector <8 x i16> %.splatinsert, <8 x i16> undef, <8 x i32> zeroinitializer
175 %0 = call <4 x i32> @llvm.arm.mve.vqdmull.v4i32.v8i16(<8 x i16> %a, <8 x i16> %.splat, i32 1)
179 define arm_aapcs_vfpcc <2 x i64> @test_vqdmulltq_n_s32(<4 x i32> %a, i32 %b) {
180 ; CHECK-LABEL: test_vqdmulltq_n_s32:
181 ; CHECK: @ %bb.0: @ %entry
182 ; CHECK-NEXT: vqdmullt.s32 q1, q0, r0
183 ; CHECK-NEXT: vmov q0, q1
186 %.splatinsert = insertelement <4 x i32> undef, i32 %b, i32 0
187 %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> undef, <4 x i32> zeroinitializer
188 %0 = call <2 x i64> @llvm.arm.mve.vqdmull.v2i64.v4i32(<4 x i32> %a, <4 x i32> %.splat, i32 1)
192 define arm_aapcs_vfpcc <4 x i32> @test_vqdmulltq_m_n_s16(<4 x i32> %inactive, <8 x i16> %a, i16 signext %b, i16 zeroext %p) {
193 ; CHECK-LABEL: test_vqdmulltq_m_n_s16:
194 ; CHECK: @ %bb.0: @ %entry
195 ; CHECK-NEXT: vmsr p0, r1
197 ; CHECK-NEXT: vqdmulltt.s16 q0, q1, r0
200 %.splatinsert = insertelement <8 x i16> undef, i16 %b, i32 0
201 %.splat = shufflevector <8 x i16> %.splatinsert, <8 x i16> undef, <8 x i32> zeroinitializer
202 %0 = zext i16 %p to i32
203 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
204 %2 = call <4 x i32> @llvm.arm.mve.vqdmull.predicated.v4i32.v8i16.v4i1(<8 x i16> %a, <8 x i16> %.splat, i32 1, <4 x i1> %1, <4 x i32> %inactive)
208 define arm_aapcs_vfpcc <2 x i64> @test_vqdmulltq_m_n_s32(<2 x i64> %inactive, <4 x i32> %a, i32 %b, i16 zeroext %p) {
209 ; CHECK-LABEL: test_vqdmulltq_m_n_s32:
210 ; CHECK: @ %bb.0: @ %entry
211 ; CHECK-NEXT: vmsr p0, r1
213 ; CHECK-NEXT: vqdmulltt.s32 q0, q1, r0
216 %.splatinsert = insertelement <4 x i32> undef, i32 %b, i32 0
217 %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> undef, <4 x i32> zeroinitializer
218 %0 = zext i16 %p to i32
219 %1 = call <2 x i1> @llvm.arm.mve.pred.i2v.v2i1(i32 %0)
220 %2 = call <2 x i64> @llvm.arm.mve.vqdmull.predicated.v2i64.v4i32.v2i1(<4 x i32> %a, <4 x i32> %.splat, i32 1, <2 x i1> %1, <2 x i64> %inactive)