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 <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32)
5 declare <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32)
6 declare <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32)
8 declare i32 @llvm.arm.mve.vabav.v16i8(i32, i32, <16 x i8>, <16 x i8>)
9 declare i32 @llvm.arm.mve.vabav.v8i16(i32, i32, <8 x i16>, <8 x i16>)
10 declare i32 @llvm.arm.mve.vabav.v4i32(i32, i32, <4 x i32>, <4 x i32>)
12 declare i32 @llvm.arm.mve.vabav.predicated.v16i8.v16i1(i32, i32, <16 x i8>, <16 x i8>, <16 x i1>)
13 declare i32 @llvm.arm.mve.vabav.predicated.v8i16.v8i1(i32, i32, <8 x i16>, <8 x i16>, <8 x i1>)
14 declare i32 @llvm.arm.mve.vabav.predicated.v4i32.v4i1(i32, i32, <4 x i32>, <4 x i32>, <4 x i1>)
16 define arm_aapcs_vfpcc i32 @test_vabavq_s8(i32 %a, <16 x i8> %b, <16 x i8> %c) {
17 ; CHECK-LABEL: test_vabavq_s8:
18 ; CHECK: @ %bb.0: @ %entry
19 ; CHECK-NEXT: vabav.s8 r0, q0, q1
22 %0 = call i32 @llvm.arm.mve.vabav.v16i8(i32 0, i32 %a, <16 x i8> %b, <16 x i8> %c)
26 define arm_aapcs_vfpcc i32 @test_vabavq_s16(i32 %a, <8 x i16> %b, <8 x i16> %c) {
27 ; CHECK-LABEL: test_vabavq_s16:
28 ; CHECK: @ %bb.0: @ %entry
29 ; CHECK-NEXT: vabav.s16 r0, q0, q1
32 %0 = call i32 @llvm.arm.mve.vabav.v8i16(i32 0, i32 %a, <8 x i16> %b, <8 x i16> %c)
36 define arm_aapcs_vfpcc i32 @test_vabavq_s32(i32 %a, <4 x i32> %b, <4 x i32> %c) {
37 ; CHECK-LABEL: test_vabavq_s32:
38 ; CHECK: @ %bb.0: @ %entry
39 ; CHECK-NEXT: vabav.s32 r0, q0, q1
42 %0 = call i32 @llvm.arm.mve.vabav.v4i32(i32 0, i32 %a, <4 x i32> %b, <4 x i32> %c)
46 define arm_aapcs_vfpcc i32 @test_vabavq_u8(i32 %a, <16 x i8> %b, <16 x i8> %c) {
47 ; CHECK-LABEL: test_vabavq_u8:
48 ; CHECK: @ %bb.0: @ %entry
49 ; CHECK-NEXT: vabav.u8 r0, q0, q1
52 %0 = call i32 @llvm.arm.mve.vabav.v16i8(i32 1, i32 %a, <16 x i8> %b, <16 x i8> %c)
56 define arm_aapcs_vfpcc i32 @test_vabavq_u16(i32 %a, <8 x i16> %b, <8 x i16> %c) {
57 ; CHECK-LABEL: test_vabavq_u16:
58 ; CHECK: @ %bb.0: @ %entry
59 ; CHECK-NEXT: vabav.u16 r0, q0, q1
62 %0 = call i32 @llvm.arm.mve.vabav.v8i16(i32 1, i32 %a, <8 x i16> %b, <8 x i16> %c)
66 define arm_aapcs_vfpcc i32 @test_vabavq_u32(i32 %a, <4 x i32> %b, <4 x i32> %c) {
67 ; CHECK-LABEL: test_vabavq_u32:
68 ; CHECK: @ %bb.0: @ %entry
69 ; CHECK-NEXT: vabav.u32 r0, q0, q1
72 %0 = call i32 @llvm.arm.mve.vabav.v4i32(i32 1, i32 %a, <4 x i32> %b, <4 x i32> %c)
76 define arm_aapcs_vfpcc i32 @test_vabavq_p_s8(i32 %a, <16 x i8> %b, <16 x i8> %c, i16 zeroext %p) {
77 ; CHECK-LABEL: test_vabavq_p_s8:
78 ; CHECK: @ %bb.0: @ %entry
79 ; CHECK-NEXT: vmsr p0, r1
81 ; CHECK-NEXT: vabavt.s8 r0, q0, q1
84 %0 = zext i16 %p to i32
85 %1 = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
86 %2 = call i32 @llvm.arm.mve.vabav.predicated.v16i8.v16i1(i32 0, i32 %a, <16 x i8> %b, <16 x i8> %c, <16 x i1> %1)
90 define arm_aapcs_vfpcc i32 @test_vabavq_p_s16(i32 %a, <8 x i16> %b, <8 x i16> %c, i16 zeroext %p) {
91 ; CHECK-LABEL: test_vabavq_p_s16:
92 ; CHECK: @ %bb.0: @ %entry
93 ; CHECK-NEXT: vmsr p0, r1
95 ; CHECK-NEXT: vabavt.s16 r0, q0, q1
98 %0 = zext i16 %p to i32
99 %1 = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
100 %2 = call i32 @llvm.arm.mve.vabav.predicated.v8i16.v8i1(i32 0, i32 %a, <8 x i16> %b, <8 x i16> %c, <8 x i1> %1)
104 define arm_aapcs_vfpcc i32 @test_vabavq_p_s32(i32 %a, <4 x i32> %b, <4 x i32> %c, i16 zeroext %p) {
105 ; CHECK-LABEL: test_vabavq_p_s32:
106 ; CHECK: @ %bb.0: @ %entry
107 ; CHECK-NEXT: vmsr p0, r1
109 ; CHECK-NEXT: vabavt.s32 r0, q0, q1
112 %0 = zext i16 %p to i32
113 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
114 %2 = call i32 @llvm.arm.mve.vabav.predicated.v4i32.v4i1(i32 0, i32 %a, <4 x i32> %b, <4 x i32> %c, <4 x i1> %1)
118 define arm_aapcs_vfpcc i32 @test_vabavq_p_u8(i32 %a, <16 x i8> %b, <16 x i8> %c, i16 zeroext %p) {
119 ; CHECK-LABEL: test_vabavq_p_u8:
120 ; CHECK: @ %bb.0: @ %entry
121 ; CHECK-NEXT: vmsr p0, r1
123 ; CHECK-NEXT: vabavt.u8 r0, q0, q1
126 %0 = zext i16 %p to i32
127 %1 = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %0)
128 %2 = call i32 @llvm.arm.mve.vabav.predicated.v16i8.v16i1(i32 1, i32 %a, <16 x i8> %b, <16 x i8> %c, <16 x i1> %1)
132 define arm_aapcs_vfpcc i32 @test_vabavq_p_u16(i32 %a, <8 x i16> %b, <8 x i16> %c, i16 zeroext %p) {
133 ; CHECK-LABEL: test_vabavq_p_u16:
134 ; CHECK: @ %bb.0: @ %entry
135 ; CHECK-NEXT: vmsr p0, r1
137 ; CHECK-NEXT: vabavt.u16 r0, q0, q1
140 %0 = zext i16 %p to i32
141 %1 = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %0)
142 %2 = call i32 @llvm.arm.mve.vabav.predicated.v8i16.v8i1(i32 1, i32 %a, <8 x i16> %b, <8 x i16> %c, <8 x i1> %1)
146 define arm_aapcs_vfpcc i32 @test_vabavq_p_u32(i32 %a, <4 x i32> %b, <4 x i32> %c, i16 zeroext %p) {
147 ; CHECK-LABEL: test_vabavq_p_u32:
148 ; CHECK: @ %bb.0: @ %entry
149 ; CHECK-NEXT: vmsr p0, r1
151 ; CHECK-NEXT: vabavt.u32 r0, q0, q1
154 %0 = zext i16 %p to i32
155 %1 = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %0)
156 %2 = call i32 @llvm.arm.mve.vabav.predicated.v4i32.v4i1(i32 1, i32 %a, <4 x i32> %b, <4 x i32> %c, <4 x i1> %1)