; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s define arm_aapcs_vfpcc <8 x i16> @vqmovni32_sminmax_t1(<4 x i32> %s0, <8 x i16> %src1) { ; CHECK-LABEL: vqmovni32_sminmax_t1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnt.s32 q1, q0 ; CHECK-NEXT: vmov q0, q1 ; CHECK-NEXT: bx lr entry: %c1 = icmp sgt <4 x i32> %s0, %s1 = select <4 x i1> %c1, <4 x i32> %s0, <4 x i32> %c2 = icmp slt <4 x i32> %s1, %s2 = select <4 x i1> %c2, <4 x i32> %s1, <4 x i32> %src2 = bitcast <4 x i32> %s2 to <8 x i16> %out = shufflevector <8 x i16> %src1, <8 x i16> %src2, <8 x i32> ret <8 x i16> %out } define arm_aapcs_vfpcc <8 x i16> @vqmovni32_sminmax_t2(<4 x i32> %s0, <8 x i16> %src1) { ; CHECK-LABEL: vqmovni32_sminmax_t2: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.s32 q0, q0 ; CHECK-NEXT: vmovnt.i32 q0, q1 ; CHECK-NEXT: bx lr entry: %c1 = icmp sgt <4 x i32> %s0, %s1 = select <4 x i1> %c1, <4 x i32> %s0, <4 x i32> %c2 = icmp slt <4 x i32> %s1, %s2 = select <4 x i1> %c2, <4 x i32> %s1, <4 x i32> %src2 = bitcast <4 x i32> %s2 to <8 x i16> %out = shufflevector <8 x i16> %src1, <8 x i16> %src2, <8 x i32> ret <8 x i16> %out } define arm_aapcs_vfpcc <8 x i16> @vqmovni32_sminmax_b1(<4 x i32> %s0, <8 x i16> %src1) { ; CHECK-LABEL: vqmovni32_sminmax_b1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.s32 q1, q0 ; CHECK-NEXT: vmov q0, q1 ; CHECK-NEXT: bx lr entry: %c1 = icmp sgt <4 x i32> %s0, %s1 = select <4 x i1> %c1, <4 x i32> %s0, <4 x i32> %c2 = icmp slt <4 x i32> %s1, %s2 = select <4 x i1> %c2, <4 x i32> %s1, <4 x i32> %src2 = bitcast <4 x i32> %s2 to <8 x i16> %out = shufflevector <8 x i16> %src1, <8 x i16> %src2, <8 x i32> ret <8 x i16> %out } define arm_aapcs_vfpcc <8 x i16> @vqmovni32_sminmax_b2(<4 x i32> %s0, <8 x i16> %src1) { ; CHECK-LABEL: vqmovni32_sminmax_b2: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.s32 q0, q0 ; CHECK-NEXT: vmovlb.s16 q0, q0 ; CHECK-NEXT: vmovnb.i32 q0, q1 ; CHECK-NEXT: bx lr entry: %c1 = icmp sgt <4 x i32> %s0, %s1 = select <4 x i1> %c1, <4 x i32> %s0, <4 x i32> %c2 = icmp slt <4 x i32> %s1, %s2 = select <4 x i1> %c2, <4 x i32> %s1, <4 x i32> %src2 = bitcast <4 x i32> %s2 to <8 x i16> %out = shufflevector <8 x i16> %src1, <8 x i16> %src2, <8 x i32> ret <8 x i16> %out } define arm_aapcs_vfpcc <8 x i16> @vqmovni32_uminmax_t1(<4 x i32> %s0, <8 x i16> %src1) { ; CHECK-LABEL: vqmovni32_uminmax_t1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.u32 q0, q0 ; CHECK-NEXT: vmovlb.u16 q0, q0 ; CHECK-NEXT: vmovnt.i32 q1, q0 ; CHECK-NEXT: vmov q0, q1 ; CHECK-NEXT: bx lr entry: %c2 = icmp ult <4 x i32> %s0, %s2 = select <4 x i1> %c2, <4 x i32> %s0, <4 x i32> %src2 = bitcast <4 x i32> %s2 to <8 x i16> %out = shufflevector <8 x i16> %src1, <8 x i16> %src2, <8 x i32> ret <8 x i16> %out } define arm_aapcs_vfpcc <8 x i16> @vqmovni32_uminmax_t2(<4 x i32> %s0, <8 x i16> %src1) { ; CHECK-LABEL: vqmovni32_uminmax_t2: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.u32 q0, q0 ; CHECK-NEXT: vmovlb.u16 q0, q0 ; CHECK-NEXT: vmovnt.i32 q0, q1 ; CHECK-NEXT: bx lr entry: %c2 = icmp ult <4 x i32> %s0, %s2 = select <4 x i1> %c2, <4 x i32> %s0, <4 x i32> %src2 = bitcast <4 x i32> %s2 to <8 x i16> %out = shufflevector <8 x i16> %src1, <8 x i16> %src2, <8 x i32> ret <8 x i16> %out } define arm_aapcs_vfpcc <8 x i16> @vqmovni32_uminmax_b1(<4 x i32> %s0, <8 x i16> %src1) { ; CHECK-LABEL: vqmovni32_uminmax_b1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.u32 q0, q0 ; CHECK-NEXT: vmovlb.u16 q0, q0 ; CHECK-NEXT: vmovnb.i32 q1, q0 ; CHECK-NEXT: vmov q0, q1 ; CHECK-NEXT: bx lr entry: %c2 = icmp ult <4 x i32> %s0, %s2 = select <4 x i1> %c2, <4 x i32> %s0, <4 x i32> %src2 = bitcast <4 x i32> %s2 to <8 x i16> %out = shufflevector <8 x i16> %src1, <8 x i16> %src2, <8 x i32> ret <8 x i16> %out } define arm_aapcs_vfpcc <8 x i16> @vqmovni32_uminmax_b2(<4 x i32> %s0, <8 x i16> %src1) { ; CHECK-LABEL: vqmovni32_uminmax_b2: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: vmovnb.i32 q0, q1 ; CHECK-NEXT: bx lr entry: %c2 = icmp ult <4 x i32> %s0, %s2 = select <4 x i1> %c2, <4 x i32> %s0, <4 x i32> %src2 = bitcast <4 x i32> %s2 to <8 x i16> %out = shufflevector <8 x i16> %src1, <8 x i16> %src2, <8 x i32> ret <8 x i16> %out } define arm_aapcs_vfpcc <16 x i8> @vqmovni16_sminmax_t1(<8 x i16> %s0, <16 x i8> %src1) { ; CHECK-LABEL: vqmovni16_sminmax_t1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnt.s16 q1, q0 ; CHECK-NEXT: vmov q0, q1 ; CHECK-NEXT: bx lr entry: %c1 = icmp sgt <8 x i16> %s0, %s1 = select <8 x i1> %c1, <8 x i16> %s0, <8 x i16> %c2 = icmp slt <8 x i16> %s1, %s2 = select <8 x i1> %c2, <8 x i16> %s1, <8 x i16> %src2 = bitcast <8 x i16> %s2 to <16 x i8> %out = shufflevector <16 x i8> %src1, <16 x i8> %src2, <16 x i32> ret <16 x i8> %out } define arm_aapcs_vfpcc <16 x i8> @vqmovni16_sminmax_t2(<8 x i16> %s0, <16 x i8> %src1) { ; CHECK-LABEL: vqmovni16_sminmax_t2: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.s16 q0, q0 ; CHECK-NEXT: vmovnt.i16 q0, q1 ; CHECK-NEXT: bx lr entry: %c1 = icmp sgt <8 x i16> %s0, %s1 = select <8 x i1> %c1, <8 x i16> %s0, <8 x i16> %c2 = icmp slt <8 x i16> %s1, %s2 = select <8 x i1> %c2, <8 x i16> %s1, <8 x i16> %src2 = bitcast <8 x i16> %s2 to <16 x i8> %out = shufflevector <16 x i8> %src1, <16 x i8> %src2, <16 x i32> ret <16 x i8> %out } define arm_aapcs_vfpcc <16 x i8> @vqmovni16_sminmax_b1(<8 x i16> %s0, <16 x i8> %src1) { ; CHECK-LABEL: vqmovni16_sminmax_b1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.s16 q1, q0 ; CHECK-NEXT: vmov q0, q1 ; CHECK-NEXT: bx lr entry: %c1 = icmp sgt <8 x i16> %s0, %s1 = select <8 x i1> %c1, <8 x i16> %s0, <8 x i16> %c2 = icmp slt <8 x i16> %s1, %s2 = select <8 x i1> %c2, <8 x i16> %s1, <8 x i16> %src2 = bitcast <8 x i16> %s2 to <16 x i8> %out = shufflevector <16 x i8> %src1, <16 x i8> %src2, <16 x i32> ret <16 x i8> %out } define arm_aapcs_vfpcc <16 x i8> @vqmovni16_sminmax_b2(<8 x i16> %s0, <16 x i8> %src1) { ; CHECK-LABEL: vqmovni16_sminmax_b2: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.s16 q0, q0 ; CHECK-NEXT: vmovlb.s8 q0, q0 ; CHECK-NEXT: vmovnb.i16 q0, q1 ; CHECK-NEXT: bx lr entry: %c1 = icmp sgt <8 x i16> %s0, %s1 = select <8 x i1> %c1, <8 x i16> %s0, <8 x i16> %c2 = icmp slt <8 x i16> %s1, %s2 = select <8 x i1> %c2, <8 x i16> %s1, <8 x i16> %src2 = bitcast <8 x i16> %s2 to <16 x i8> %out = shufflevector <16 x i8> %src1, <16 x i8> %src2, <16 x i32> ret <16 x i8> %out } define arm_aapcs_vfpcc <16 x i8> @vqmovni16_uminmax_t1(<8 x i16> %s0, <16 x i8> %src1) { ; CHECK-LABEL: vqmovni16_uminmax_t1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.u16 q0, q0 ; CHECK-NEXT: vmovlb.u8 q0, q0 ; CHECK-NEXT: vmovnt.i16 q1, q0 ; CHECK-NEXT: vmov q0, q1 ; CHECK-NEXT: bx lr entry: %c2 = icmp ult <8 x i16> %s0, %s2 = select <8 x i1> %c2, <8 x i16> %s0, <8 x i16> %src2 = bitcast <8 x i16> %s2 to <16 x i8> %out = shufflevector <16 x i8> %src1, <16 x i8> %src2, <16 x i32> ret <16 x i8> %out } define arm_aapcs_vfpcc <16 x i8> @vqmovni16_uminmax_t2(<8 x i16> %s0, <16 x i8> %src1) { ; CHECK-LABEL: vqmovni16_uminmax_t2: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.u16 q0, q0 ; CHECK-NEXT: vmovlb.u8 q0, q0 ; CHECK-NEXT: vmovnt.i16 q0, q1 ; CHECK-NEXT: bx lr entry: %c2 = icmp ult <8 x i16> %s0, %s2 = select <8 x i1> %c2, <8 x i16> %s0, <8 x i16> %src2 = bitcast <8 x i16> %s2 to <16 x i8> %out = shufflevector <16 x i8> %src1, <16 x i8> %src2, <16 x i32> ret <16 x i8> %out } define arm_aapcs_vfpcc <16 x i8> @vqmovni16_uminmax_b1(<8 x i16> %s0, <16 x i8> %src1) { ; CHECK-LABEL: vqmovni16_uminmax_b1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vqmovnb.u16 q0, q0 ; CHECK-NEXT: vmovlb.u8 q0, q0 ; CHECK-NEXT: vmovnb.i16 q1, q0 ; CHECK-NEXT: vmov q0, q1 ; CHECK-NEXT: bx lr entry: %c2 = icmp ult <8 x i16> %s0, %s2 = select <8 x i1> %c2, <8 x i16> %s0, <8 x i16> %src2 = bitcast <8 x i16> %s2 to <16 x i8> %out = shufflevector <16 x i8> %src1, <16 x i8> %src2, <16 x i32> ret <16 x i8> %out } define arm_aapcs_vfpcc <16 x i8> @vqmovni16_uminmax_b2(<8 x i16> %s0, <16 x i8> %src1) { ; CHECK-LABEL: vqmovni16_uminmax_b2: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: vmovnb.i16 q0, q1 ; CHECK-NEXT: bx lr entry: %c2 = icmp ult <8 x i16> %s0, %s2 = select <8 x i1> %c2, <8 x i16> %s0, <8 x i16> %src2 = bitcast <8 x i16> %s2 to <16 x i8> %out = shufflevector <16 x i8> %src1, <16 x i8> %src2, <16 x i32> ret <16 x i8> %out }