File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
llvm/test/Transforms/SLPVectorizer/RISCV Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -793,6 +793,25 @@ entry:
793
793
ret double %add
794
794
}
795
795
796
+ define float @reduce_fadd_after_fmul_of_buildvec (float %a , float %b , float %c ) {
797
+ ; CHECK-LABEL: @reduce_fadd_after_fmul_of_buildvec(
798
+ ; CHECK-NEXT: [[MUL_0:%.*]] = fmul fast float [[A:%.*]], 1.000000e+01
799
+ ; CHECK-NEXT: [[MUL_1:%.*]] = fmul fast float [[B:%.*]], 1.000000e+01
800
+ ; CHECK-NEXT: [[MUL_2:%.*]] = fmul fast float [[C:%.*]], 1.000000e+01
801
+ ; CHECK-NEXT: [[ADD_0:%.*]] = fadd fast float [[MUL_0]], [[MUL_1]]
802
+ ; CHECK-NEXT: [[ADD_1:%.*]] = fadd fast float [[ADD_0]], [[MUL_2]]
803
+ ; CHECK-NEXT: ret float [[ADD_1]]
804
+ ;
805
+ %mul.0 = fmul fast float %a , 10 .0
806
+ %mul.1 = fmul fast float %b , 10 .0
807
+ %mul.2 = fmul fast float %c , 10 .0
808
+
809
+ %add.0 = fadd fast float %mul.0 , %mul.1
810
+ %add.1 = fadd fast float %add.0 , %mul.2
811
+ ret float %add.1
812
+ }
813
+
814
+
796
815
declare float @llvm.fmuladd.f32 (float , float , float )
797
816
798
817
declare double @llvm.fmuladd.f64 (double , double , double )
You can’t perform that action at this time.
0 commit comments