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 i1> *%mask, <16 x i8> %src1, <16 x i8> %src2) {
5 ; CHECK-LABEL: vpsel_i8:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vldr p0, [r0]
8 ; CHECK-NEXT: vpsel q0, q0, q1
11 %0 = load <16 x i1>, <16 x i1>* %mask, align 4
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 i1> *%mask, <8 x i16> %src1, <8 x i16> %src2) {
17 ; CHECK-LABEL: vpsel_i16:
18 ; CHECK: @ %bb.0: @ %entry
19 ; CHECK-NEXT: vldr p0, [r0]
20 ; CHECK-NEXT: vpsel q0, q0, q1
23 %0 = load <8 x i1>, <8 x i1>* %mask, align 4
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 i1> *%mask, <4 x i32> %src1, <4 x i32> %src2) {
29 ; CHECK-LABEL: vpsel_i32:
30 ; CHECK: @ %bb.0: @ %entry
31 ; CHECK-NEXT: vldr p0, [r0]
32 ; CHECK-NEXT: vpsel q0, q0, q1
35 %0 = load <4 x i1>, <4 x i1>* %mask, align 4
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 i1> *%mask, <8 x half> %src1, <8 x half> %src2) {
41 ; CHECK-LABEL: vpsel_f16:
42 ; CHECK: @ %bb.0: @ %entry
43 ; CHECK-NEXT: vldr p0, [r0]
44 ; CHECK-NEXT: vpsel q0, q0, q1
47 %0 = load <8 x i1>, <8 x i1>* %mask, align 4
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 i1> *%mask, <4 x float> %src1, <4 x float> %src2) {
53 ; CHECK-LABEL: vpsel_f32:
54 ; CHECK: @ %bb.0: @ %entry
55 ; CHECK-NEXT: vldr p0, [r0]
56 ; CHECK-NEXT: vpsel q0, q0, q1
59 %0 = load <4 x i1>, <4 x i1>* %mask, align 4
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