[all-commits] [llvm/llvm-project] 64f69e: [RISCV] Cost model for general case of single vect...

Philip Reames via All-commits all-commits at lists.llvm.org
Tue Mar 28 07:34:26 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 64f69e453ed38e0dcf33dfbf98f8566327d4ad93
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-03-28 (Tue, 28 Mar 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/shuffle-interleave.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/interleaved-accesses.ll

  Log Message:
  [RISCV] Cost model for general case of single vector permute

The cost model was not accounting for the fact that we can generate vrgather + an index expression.

Two cases to call out.
1) I did not model the difference between vrgather and vrgatherei16. The result is the constant pool cost can be slightly understated on RV32. I don't think we care, but if someone disagrees, this would be easy to add.
2) Our current codegen for i8 vectors longer than 256 (which is the limit of what this costs) has some room for improvement.

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

More information about the All-commits mailing list