[PATCH] D127447: [RISCV] Cost model for scalable reductions

LiqinWeng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 20:23:15 PDT 2022


Miss_Grape added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll:9
 ; CHECK-LABEL: 'vreduce_fadd_nxv1f16'
-; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, <vscale x 1 x half> %v)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, <vscale x 1 x half> %v)
 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
----------------
I would like to know how the value of the code model is calculated? Is the cycle set when scheduling related?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127447



More information about the llvm-commits mailing list