[PATCH] D127548: [Matrix] Add cost tests for fast fadd reduction

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 09:37:31 PDT 2022


fhahn added a comment.

Thanks! Could you also add tests for reductions with just the `reassoicate` fast-math flag?

Also, this is not really specific to matrix support in LLVM, but applies generally to the AArch64 cost modeling. So it would be better to use `[AArch64]` in the description.



================
Comment at: llvm/test/Analysis/CostModel/AArch64/reduce-fadd.ll:25
+
+define void @strict_fp_reductions_fast() {
+; CHECK-LABEL: 'strict_fp_reductions_fast'
----------------
I think the `strict` part here refers to the ordering requirement, i.e. strict sequential order.

So it would probably be better to name the function `@fast_fp_reductions`.


================
Comment at: llvm/test/Analysis/CostModel/AArch64/reduce-fadd.ll:40
+  %fadd_v2f64 = call fast double @llvm.vector.reduce.fadd.v2f64(double 0.0, <2 x double> undef)
+  %fadd_v4f64 = call fast double @llvm.vector.reduce.fadd.v4f64(double 0.0, <4 x double> undef)
+
----------------
can you also throw in some vectors with some odd numbers of elements.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127548/new/

https://reviews.llvm.org/D127548



More information about the llvm-commits mailing list