[all-commits] [llvm/llvm-project] 3a6269: [RISCV][TTI] Extract subvector at index zero is fr...

Philip Reames via All-commits all-commits at lists.llvm.org
Thu Feb 15 07:44:03 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a626937b1b652e3c87cd0050df9c24cc5127d3b
      https://github.com/llvm/llvm-project/commit/3a626937b1b652e3c87cd0050df9c24cc5127d3b
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-02-15 (Thu, 15 Feb 2024)

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

  Log Message:
  -----------
  [RISCV][TTI] Extract subvector at index zero is free (#81751)

Extracing a subvector at index zero corresponds to a type conversion and
possibly a subregister operation. We will not emit a vslidedown. As
such, they are free.

As an aside, it looks like we're not passing an index in for cases where
the subvec type is scalable. For at least index zero, we probably should
be.




More information about the All-commits mailing list