[llvm] [SystemZ] SLP reductions: cost functions of reductions and scalarization (PR #112491)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 09:26:23 PDT 2024


================
@@ -2,28 +2,22 @@
 ; RUN:   -pass-remarks-output=%t | FileCheck %s
 ; RUN: cat %t | FileCheck -check-prefix=REMARK %s
 ;
-; NB! This is a pre-commit version (for #112491) with current codegen and remarks.
-;
 ; Test functions that (at least currently) only gets vectorized if the
 ; insertion cost for an element load is counted as free.
 
 ; This function needs the free element load to be recognized in SLP
 ; getGatherCost().
 define void @fun0(ptr nocapture %0, double %1) {
 ; CHECK-LABEL: define void @fun0(
-; CHECK:         fmul double
-; CHECK:         call double @llvm.fmuladd.f64(
-; CHECK-NEXT:    call double @llvm.fmuladd.f64(
-; CHECK-NEXT:    call double @llvm.sqrt.f64(
-; CHECK:         fmul double
-; CHECK:         call double @llvm.fmuladd.f64(
-; CHECK-NEXT:    call double @llvm.fmuladd.f64(
-; CHECK-NEXT:    call double @llvm.sqrt.f64(
+; CHECK:         fmul <2 x double>
+; CHECK-NEXT:    call <2 x double> @llvm.fmuladd.v2f64(
+; CHECK-NEXT:    call <2 x double> @llvm.fmuladd.v2f64(
+; CHECK-NEXT:    call <2 x double> @llvm.sqrt.v2f64(
----------------
alexey-bataev wrote:

Could you auto generate the checks here using the script?
The checks for the costs still will be manual, but the IR checks better to auto-generate

https://github.com/llvm/llvm-project/pull/112491


More information about the llvm-commits mailing list