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 declare <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32)
5 declare <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32)
7 declare <8 x half> @llvm.arm.mve.vcmlaq.v8f16(i32, <8 x half>, <8 x half>, <8 x half>)
8 declare <4 x float> @llvm.arm.mve.vcmlaq.v4f32(i32, <4 x float>, <4 x float>, <4 x float>)
10 declare <8 x half> @llvm.arm.mve.vcmlaq.predicated.v8f16.v8i1(i32, <8 x half>, <8 x half>, <8 x half>, <8 x i1>)
11 declare <4 x float> @llvm.arm.mve.vcmlaq.predicated.v4f32.v4i1(i32, <4 x float>, <4 x float>, <4 x float>, <4 x i1>)
14 define arm_aapcs_vfpcc <8 x half> @test_vcmlaq_f16(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
15 ; CHECK-LABEL: test_vcmlaq_f16:
16 ; CHECK: @ %bb.0: @ %entry
17 ; CHECK-NEXT: vcmla.f16 q0, q1, q2, #0
20 %0 = call <8 x half> @llvm.arm.mve.vcmlaq.v8f16(i32 0, <8 x half> %a, <8 x half> %b, <8 x half> %c)
24 define arm_aapcs_vfpcc <4 x float> @test_vcmlaq_f32(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
25 ; CHECK-LABEL: test_vcmlaq_f32:
26 ; CHECK: @ %bb.0: @ %entry
27 ; CHECK-NEXT: vcmla.f32 q0, q1, q2, #0
30 %0 = call <4 x float> @llvm.arm.mve.vcmlaq.v4f32(i32 0, <4 x float> %a, <4 x float> %b, <4 x float> %c)
35 define arm_aapcs_vfpcc <8 x half> @test_vcmlaq_rot90_f16(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
36 ; CHECK-LABEL: test_vcmlaq_rot90_f16:
37 ; CHECK: @ %bb.0: @ %entry
38 ; CHECK-NEXT: vcmla.f16 q0, q1, q2, #90
41 %0 = call <8 x half> @llvm.arm.mve.vcmlaq.v8f16(i32 1, <8 x half> %a, <8 x half> %b, <8 x half> %c)
45 define arm_aapcs_vfpcc <4 x float> @test_vcmlaq_rot90_f32(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
46 ; CHECK-LABEL: test_vcmlaq_rot90_f32:
47 ; CHECK: @ %bb.0: @ %entry
48 ; CHECK-NEXT: vcmla.f32 q0, q1, q2, #90
51 %0 = call <4 x float> @llvm.arm.mve.vcmlaq.v4f32(i32 1, <4 x float> %a, <4 x float> %b, <4 x float> %c)
55 define arm_aapcs_vfpcc <8 x half> @test_vcmlaq_rot180_f16(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
56 ; CHECK-LABEL: test_vcmlaq_rot180_f16:
57 ; CHECK: @ %bb.0: @ %entry
58 ; CHECK-NEXT: vcmla.f16 q0, q1, q2, #180
61 %0 = call <8 x half> @llvm.arm.mve.vcmlaq.v8f16(i32 2, <8 x half> %a, <8 x half> %b, <8 x half> %c)
65 define arm_aapcs_vfpcc <4 x float> @test_vcmlaq_rot180_f32(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
66 ; CHECK-LABEL: test_vcmlaq_rot180_f32:
67 ; CHECK: @ %bb.0: @ %entry
68 ; CHECK-NEXT: vcmla.f32 q0, q1, q2, #180
71 %0 = call <4 x float> @llvm.arm.mve.vcmlaq.v4f32(i32 2, <4 x float> %a, <4 x float> %b, <4 x float> %c)
75 define arm_aapcs_vfpcc <8 x half> @test_vcmlaq_rot270_f16(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
76 ; CHECK-LABEL: test_vcmlaq_rot270_f16:
77 ; CHECK: @ %bb.0: @ %entry
78 ; CHECK-NEXT: vcmla.f16 q0, q1, q2, #270
81 %0 = call <8 x half> @llvm.arm.mve.vcmlaq.v8f16(i32 3, <8 x half> %a, <8 x half> %b, <8 x half> %c)
85 define arm_aapcs_vfpcc <4 x float> @test_vcmlaq_rot270_f32(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
86 ; CHECK-LABEL: test_vcmlaq_rot270_f32:
87 ; CHECK: @ %bb.0: @ %entry
88 ; CHECK-NEXT: vcmla.f32 q0, q1, q2, #270
91 %0 = call <4 x float> @llvm.arm.mve.vcmlaq.v4f32(i32 3, <4 x float> %a, <4 x float> %b, <4 x float> %c)
95 define arm_aapcs_vfpcc <8 x half> @test_vcmlaq_m_f16(<8 x half> %a, <8 x half> %b, <8 x half> %c, i16 zeroext %p) {
96 ; CHECK-LABEL: test_vcmlaq_m_f16:
97 ; CHECK: @ %bb.0: @ %entry
98 ; CHECK-NEXT: vmsr p0, r0
100 ; CHECK-NEXT: vcmlat.f16 q0, q1, q2, #0
103 %0 = zext i16 %p to i32
104 %1 = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
105 %2 = call <8 x half> @llvm.arm.mve.vcmlaq.predicated.v8f16.v8i1(i32 0, <8 x half> %a, <8 x half> %b, <8 x half> %c, <8 x i1> %1)
109 define arm_aapcs_vfpcc <4 x float> @test_vcmlaq_m_f32(<4 x float> %a, <4 x float> %b, <4 x float> %c, i16 zeroext %p) {
110 ; CHECK-LABEL: test_vcmlaq_m_f32:
111 ; CHECK: @ %bb.0: @ %entry
112 ; CHECK-NEXT: vmsr p0, r0
114 ; CHECK-NEXT: vcmlat.f32 q0, q1, q2, #0
117 %0 = zext i16 %p to i32
118 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
119 %2 = call <4 x float> @llvm.arm.mve.vcmlaq.predicated.v4f32.v4i1(i32 0, <4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x i1> %1)
123 define arm_aapcs_vfpcc <8 x half> @test_vcmlaq_rot90_m_f16(<8 x half> %a, <8 x half> %b, <8 x half> %c, i16 zeroext %p) {
124 ; CHECK-LABEL: test_vcmlaq_rot90_m_f16:
125 ; CHECK: @ %bb.0: @ %entry
126 ; CHECK-NEXT: vmsr p0, r0
128 ; CHECK-NEXT: vcmlat.f16 q0, q1, q2, #90
131 %0 = zext i16 %p to i32
132 %1 = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
133 %2 = call <8 x half> @llvm.arm.mve.vcmlaq.predicated.v8f16.v8i1(i32 1, <8 x half> %a, <8 x half> %b, <8 x half> %c, <8 x i1> %1)
137 define arm_aapcs_vfpcc <4 x float> @test_vcmlaq_rot90_m_f32(<4 x float> %a, <4 x float> %b, <4 x float> %c, i16 zeroext %p) {
138 ; CHECK-LABEL: test_vcmlaq_rot90_m_f32:
139 ; CHECK: @ %bb.0: @ %entry
140 ; CHECK-NEXT: vmsr p0, r0
142 ; CHECK-NEXT: vcmlat.f32 q0, q1, q2, #90
145 %0 = zext i16 %p to i32
146 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
147 %2 = call <4 x float> @llvm.arm.mve.vcmlaq.predicated.v4f32.v4i1(i32 1, <4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x i1> %1)
151 define arm_aapcs_vfpcc <8 x half> @test_vcmlaq_rot180_m_f16(<8 x half> %a, <8 x half> %b, <8 x half> %c, i16 zeroext %p) {
152 ; CHECK-LABEL: test_vcmlaq_rot180_m_f16:
153 ; CHECK: @ %bb.0: @ %entry
154 ; CHECK-NEXT: vmsr p0, r0
156 ; CHECK-NEXT: vcmlat.f16 q0, q1, q2, #180
159 %0 = zext i16 %p to i32
160 %1 = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
161 %2 = call <8 x half> @llvm.arm.mve.vcmlaq.predicated.v8f16.v8i1(i32 2, <8 x half> %a, <8 x half> %b, <8 x half> %c, <8 x i1> %1)
165 define arm_aapcs_vfpcc <4 x float> @test_vcmlaq_rot180_m_f32(<4 x float> %a, <4 x float> %b, <4 x float> %c, i16 zeroext %p) {
166 ; CHECK-LABEL: test_vcmlaq_rot180_m_f32:
167 ; CHECK: @ %bb.0: @ %entry
168 ; CHECK-NEXT: vmsr p0, r0
170 ; CHECK-NEXT: vcmlat.f32 q0, q1, q2, #180
173 %0 = zext i16 %p to i32
174 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
175 %2 = call <4 x float> @llvm.arm.mve.vcmlaq.predicated.v4f32.v4i1(i32 2, <4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x i1> %1)
179 define arm_aapcs_vfpcc <8 x half> @test_vcmlaq_rot270_m_f16(<8 x half> %a, <8 x half> %b, <8 x half> %c, i16 zeroext %p) {
180 ; CHECK-LABEL: test_vcmlaq_rot270_m_f16:
181 ; CHECK: @ %bb.0: @ %entry
182 ; CHECK-NEXT: vmsr p0, r0
184 ; CHECK-NEXT: vcmlat.f16 q0, q1, q2, #270
187 %0 = zext i16 %p to i32
188 %1 = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
189 %2 = call <8 x half> @llvm.arm.mve.vcmlaq.predicated.v8f16.v8i1(i32 3, <8 x half> %a, <8 x half> %b, <8 x half> %c, <8 x i1> %1)
193 define arm_aapcs_vfpcc <4 x float> @test_vcmlaq_rot270_m_f32(<4 x float> %a, <4 x float> %b, <4 x float> %c, i16 zeroext %p) {
194 ; CHECK-LABEL: test_vcmlaq_rot270_m_f32:
195 ; CHECK: @ %bb.0: @ %entry
196 ; CHECK-NEXT: vmsr p0, r0
198 ; CHECK-NEXT: vcmlat.f32 q0, q1, q2, #270
201 %0 = zext i16 %p to i32
202 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
203 %2 = call <4 x float> @llvm.arm.mve.vcmlaq.predicated.v4f32.v4i1(i32 3, <4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x i1> %1)