[all-commits] [llvm/llvm-project] 0b524e: [RISCV][TTI] Reduce cost of a <N x i1> build_vecto...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon Sep 23 07:22:16 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b524efa953ce4a1f41ff6abaa8e3c5f757e40e2
      https://github.com/llvm/llvm-project/commit/0b524efa953ce4a1f41ff6abaa8e3c5f757e40e2
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-09-23 (Mon, 23 Sep 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/rvv-intrinsics.ll
    M llvm/test/Transforms/VectorCombine/RISCV/shuffle-of-intrinsics.ll

  Log Message:
  -----------
  [RISCV][TTI] Reduce cost of a <N x i1> build_vector pattern (#109449)

This is a follow up to 7f6bbb3. When lowering a <N x i1> build_vector,
we currently chose to extend to i8, perform the build_vector there, and
then truncate back in vector. Our costing on the other hand accounts for
it as if we performed a vector extend, an insert, and a vector extract
for every element. This significantly over estimates the cost.

Note that we can likely do better in our build_vector lowering here by
packing the bits in scalar, and doing a build_vector of the packed bits.
Regardless, our costing should match our lowering.



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