[all-commits] [llvm/llvm-project] 2e7c7d: [RISCV][TTI] Adjust cost for extract/insert elemen...

Philip Reames via All-commits all-commits at lists.llvm.org
Tue Sep 17 08:44:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e7c7d20d55be51f907d87a2298660d73a1cc190
      https://github.com/llvm/llvm-project/commit/2e7c7d20d55be51f907d87a2298660d73a1cc190
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-09-17 (Tue, 17 Sep 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll
    M llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll

  Log Message:
  -----------
  [RISCV][TTI] Adjust cost for extract/insert element when VLEN is known (#108595)

If we know an exact VLEN, then the index is effectively modulo the
number of elements in a single vector register. Our lowering performs
this subvector optimization.

A bit of context. This change may look a bit strange on it's own given
we are currently *not* scaling insert/extract cost by LMUL. This costing
decision needs to change, but is very intertwined with SLP
profitability, and is thus a bit hard to adjust. I'm hoping that
https://github.com/llvm/llvm-project/pull/108419 will let me start to
untangle this. This change is basically a case of finding a subset I can
tackle before other dependencies are in place which does no real harm in
the meantime.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list