; 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 @vfsub_vv_nxv1f16( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf4,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv1f16( %va, half %b) { ; CHECK-LABEL: vfsub_vf_nxv1f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf4,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv2f16( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv2f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf2,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv2f16( %va, half %b) { ; CHECK-LABEL: vfsub_vf_nxv2f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,mf2,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv4f16( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv4f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m1,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv4f16( %va, half %b) { ; CHECK-LABEL: vfsub_vf_nxv4f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m1,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv8f16( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v10 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv8f16( %va, half %b) { ; CHECK-LABEL: vfsub_vf_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_fv_nxv8f16( %va, half %b) { ; CHECK-LABEL: vfsub_fv_nxv8f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m2,ta,mu ; CHECK-NEXT: vfrsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %splat, %va ret %vc } define @vfsub_vv_nxv16f16( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv16f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m4,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v12 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv16f16( %va, half %b) { ; CHECK-LABEL: vfsub_vf_nxv16f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m4,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv32f16( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv32f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m8,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v16 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv32f16( %va, half %b) { ; CHECK-LABEL: vfsub_vf_nxv32f16: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e16,m8,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, half %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv1f32( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,mf2,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv1f32( %va, float %b) { ; CHECK-LABEL: vfsub_vf_nxv1f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,mf2,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv2f32( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv2f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m1,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv2f32( %va, float %b) { ; CHECK-LABEL: vfsub_vf_nxv2f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m1,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv4f32( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv4f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m2,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v10 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv4f32( %va, float %b) { ; CHECK-LABEL: vfsub_vf_nxv4f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m2,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv8f32( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v12 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv8f32( %va, float %b) { ; CHECK-LABEL: vfsub_vf_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_fv_nxv8f32( %va, float %b) { ; CHECK-LABEL: vfsub_fv_nxv8f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m4,ta,mu ; CHECK-NEXT: vfrsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %splat, %va ret %vc } define @vfsub_vv_nxv16f32( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv16f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m8,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v16 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv16f32( %va, float %b) { ; CHECK-LABEL: vfsub_vf_nxv16f32: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e32,m8,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, float %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv1f64( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m1,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v9 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv1f64( %va, double %b) { ; CHECK-LABEL: vfsub_vf_nxv1f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m1,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv2f64( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv2f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m2,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v10 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv2f64( %va, double %b) { ; CHECK-LABEL: vfsub_vf_nxv2f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m2,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv4f64( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv4f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m4,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v12 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv4f64( %va, double %b) { ; CHECK-LABEL: vfsub_vf_nxv4f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m4,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_vv_nxv8f64( %va, %vb) { ; CHECK-LABEL: vfsub_vv_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vfsub.vv v8, v8, v16 ; CHECK-NEXT: ret %vc = fsub %va, %vb ret %vc } define @vfsub_vf_nxv8f64( %va, double %b) { ; CHECK-LABEL: vfsub_vf_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vfsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %va, %splat ret %vc } define @vfsub_fv_nxv8f64( %va, double %b) { ; CHECK-LABEL: vfsub_fv_nxv8f64: ; CHECK: # %bb.0: ; CHECK-NEXT: vsetvli a0, zero, e64,m8,ta,mu ; CHECK-NEXT: vfrsub.vf v8, v8, fa0 ; CHECK-NEXT: ret %head = insertelement undef, double %b, i32 0 %splat = shufflevector %head, undef, zeroinitializer %vc = fsub %splat, %va ret %vc }