; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=riscv64 -mattr=+d,+experimental-zfh,+experimental-v -target-abi=lp64d \ ; RUN: -verify-machineinstrs < %s | FileCheck %s define @vfadd_vv_nxv1f16( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf4,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv1f16( %va, half %b) { ; CHECK-LABEL: vfadd_vf_nxv1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf4,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv2f16( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv2f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf2,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv2f16( %va, half %b) { ; CHECK-LABEL: vfadd_vf_nxv2f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf2,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv4f16( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv4f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m1,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv4f16( %va, half %b) { ; CHECK-LABEL: vfadd_vf_nxv4f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m1,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv8f16( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v10 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv8f16( %va, half %b) { ; CHECK-LABEL: vfadd_vf_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_fv_nxv8f16( %va, half %b) { ; CHECK-LABEL: vfadd_fv_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %splat, %va ret %vc } define @vfadd_vv_nxv16f16( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv16f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m4,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v12 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv16f16( %va, half %b) { ; CHECK-LABEL: vfadd_vf_nxv16f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m4,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv32f16( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv32f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m8,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v16 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv32f16( %va, half %b) { ; CHECK-LABEL: vfadd_vf_nxv32f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m8,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv1f32( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,mf2,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv1f32( %va, float %b) { ; CHECK-LABEL: vfadd_vf_nxv1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,mf2,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv2f32( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv2f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m1,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv2f32( %va, float %b) { ; CHECK-LABEL: vfadd_vf_nxv2f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m1,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv4f32( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv4f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m2,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v10 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv4f32( %va, float %b) { ; CHECK-LABEL: vfadd_vf_nxv4f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m2,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv8f32( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v12 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv8f32( %va, float %b) { ; CHECK-LABEL: vfadd_vf_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_fv_nxv8f32( %va, float %b) { ; CHECK-LABEL: vfadd_fv_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %splat, %va ret %vc } define @vfadd_vv_nxv16f32( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv16f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m8,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v16 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv16f32( %va, float %b) { ; CHECK-LABEL: vfadd_vf_nxv16f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m8,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv1f64( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m1,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv1f64( %va, double %b) { ; CHECK-LABEL: vfadd_vf_nxv1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m1,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv2f64( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv2f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m2,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v10 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv2f64( %va, double %b) { ; CHECK-LABEL: vfadd_vf_nxv2f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m2,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv4f64( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv4f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m4,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v12 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv4f64( %va, double %b) { ; CHECK-LABEL: vfadd_vf_nxv4f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m4,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_vv_nxv8f64( %va, %vb) { ; CHECK-LABEL: vfadd_vv_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vfadd.vv v8, v8, v16 ; CHECK-NEXT: ret %vc = fadd %va, %vb ret %vc } define @vfadd_vf_nxv8f64( %va, double %b) { ; CHECK-LABEL: vfadd_vf_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %va, %splat ret %vc } define @vfadd_fv_nxv8f64( %va, double %b) { ; CHECK-LABEL: vfadd_fv_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vfadd.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fadd %splat, %va ret %vc }