[all-commits] [llvm/llvm-project] e7fda4: [RISCV] Correct costs for vector ceil/floor/trunc/...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Aug 19 10:44:05 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7fda4630040127cf79249b80a0cd53642ab652d
      https://github.com/llvm/llvm-project/commit/e7fda4630040127cf79249b80a0cd53642ab652d
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-08-19 (Fri, 19 Aug 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/fround.ll

  Log Message:
  -----------
  [RISCV] Correct costs for vector ceil/floor/trunc/round

Add vector costs for ceil/floor/trunc/round. As can be seen in the tests, the prior default costs were a significant under estimate of the actual code generated.

These costs are computed by simply generating code with the current backend, and then counting the number of instructions. I discount one vsetvli, and ignore the return.

Differential Revision: https://reviews.llvm.org/D131967




More information about the All-commits mailing list