; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=riscv32 -mattr=+d,+experimental-zfh,+experimental-v -target-abi=ilp32d \ ; RUN: -verify-machineinstrs < %s | FileCheck %s define @vfmerge_vv_nxv1f16( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf4,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv1f16( %va, half %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf4,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv2f16( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv2f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf2,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv2f16( %va, half %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv2f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf2,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv4f16( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv4f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m1,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv4f16( %va, half %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv4f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m1,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv8f16( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv8f16( %va, half %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_zv_nxv8f16( %va, %cond) { ; CHECK-LABEL: vfmerge_zv_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 ; CHECK-NEXT: ret %head = insertelement undef, half zeroinitializer, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv16f16( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv16f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m4,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v12, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv16f16( %va, half %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv16f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m4,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv32f16( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv32f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m8,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v16, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv32f16( %va, half %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv32f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m8,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv1f32( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,mf2,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv1f32( %va, float %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,mf2,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv2f32( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv2f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m1,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv2f32( %va, float %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv2f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m1,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv4f32( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv4f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m2,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv4f32( %va, float %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv4f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m2,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv8f32( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v12, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv8f32( %va, float %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_zv_nxv8f32( %va, %cond) { ; CHECK-LABEL: vfmerge_zv_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 ; CHECK-NEXT: ret %head = insertelement undef, float zeroinitializer, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv16f32( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv16f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m8,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v16, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv16f32( %va, float %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv16f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m8,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv1f64( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m1,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv1f64( %va, double %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m1,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv2f64( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv2f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m2,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv2f64( %va, double %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv2f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m2,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv4f64( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv4f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m4,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v12, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv4f64( %va, double %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv4f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m4,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_vv_nxv8f64( %va, %vb, %cond) { ; CHECK-LABEL: vfmerge_vv_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vmerge.vvm v8, v16, v8, v0 ; CHECK-NEXT: ret %vc = select %cond, %va, %vb ret %vc } define @vfmerge_fv_nxv8f64( %va, double %b, %cond) { ; CHECK-LABEL: vfmerge_fv_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc } define @vfmerge_zv_nxv8f64( %va, %cond) { ; CHECK-LABEL: vfmerge_zv_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 ; CHECK-NEXT: ret %head = insertelement undef, double zeroinitializer, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = select %cond, %splat, %va ret %vc }