1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O3 -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve.fp %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc <16 x i8> @vpsel_i8(<16 x i8> %mask, <16 x i8> %src1, <16 x i8> %src2) {
5 ; CHECK-LABEL: vpsel_i8:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
8 ; CHECK-NEXT: vpsel q0, q1, q2
11 %0 = icmp ne <16 x i8> %mask, zeroinitializer
12 %1 = select <16 x i1> %0, <16 x i8> %src1, <16 x i8> %src2
16 define arm_aapcs_vfpcc <8 x i16> @vpsel_i16(<8 x i16> %mask, <8 x i16> %src1, <8 x i16> %src2) {
17 ; CHECK-LABEL: vpsel_i16:
18 ; CHECK: @ %bb.0: @ %entry
19 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
20 ; CHECK-NEXT: vpsel q0, q1, q2
23 %0 = icmp ne <8 x i16> %mask, zeroinitializer
24 %1 = select <8 x i1> %0, <8 x i16> %src1, <8 x i16> %src2
28 define arm_aapcs_vfpcc <4 x i32> @vpsel_i32(<4 x i32> %mask, <4 x i32> %src1, <4 x i32> %src2) {
29 ; CHECK-LABEL: vpsel_i32:
30 ; CHECK: @ %bb.0: @ %entry
31 ; CHECK-NEXT: vcmp.i32 ne, q0, zr
32 ; CHECK-NEXT: vpsel q0, q1, q2
35 %0 = icmp ne <4 x i32> %mask, zeroinitializer
36 %1 = select <4 x i1> %0, <4 x i32> %src1, <4 x i32> %src2
40 define arm_aapcs_vfpcc <8 x half> @vpsel_f16(<8 x i16> %mask, <8 x half> %src1, <8 x half> %src2) {
41 ; CHECK-LABEL: vpsel_f16:
42 ; CHECK: @ %bb.0: @ %entry
43 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
44 ; CHECK-NEXT: vpsel q0, q1, q2
47 %0 = icmp ne <8 x i16> %mask, zeroinitializer
48 %1 = select <8 x i1> %0, <8 x half> %src1, <8 x half> %src2
52 define arm_aapcs_vfpcc <4 x float> @vpsel_f32(<4 x i32> %mask, <4 x float> %src1, <4 x float> %src2) {
53 ; CHECK-LABEL: vpsel_f32:
54 ; CHECK: @ %bb.0: @ %entry
55 ; CHECK-NEXT: vcmp.i32 ne, q0, zr
56 ; CHECK-NEXT: vpsel q0, q1, q2
59 %0 = icmp ne <4 x i32> %mask, zeroinitializer
60 %1 = select <4 x i1> %0, <4 x float> %src1, <4 x float> %src2
64 define arm_aapcs_vfpcc <4 x i32> @foo(<4 x i32> %vec.ind) {
67 ; CHECK-NEXT: vmov.i32 q2, #0x1
68 ; CHECK-NEXT: vmov.i32 q1, #0x0
69 ; CHECK-NEXT: vand q2, q0, q2
70 ; CHECK-NEXT: vcmp.i32 eq, q2, zr
71 ; CHECK-NEXT: vpsel q0, q0, q1
73 %tmp = and <4 x i32> %vec.ind, <i32 1, i32 1, i32 1, i32 1>
74 %tmp1 = icmp eq <4 x i32> %tmp, zeroinitializer
75 %tmp2 = select <4 x i1> %tmp1, <4 x i32> %vec.ind, <4 x i32> zeroinitializer