[all-commits] [llvm/llvm-project] dfd383: [RISCV][TTI] Implement getAddressComputationCost()...

Elvis Wang via All-commits all-commits at lists.llvm.org
Tue Aug 26 17:41:01 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dfd38336743ab94c8354826261d8e908e1396719
      https://github.com/llvm/llvm-project/commit/dfd38336743ab94c8354826261d8e908e1396719
  Author: Elvis Wang <elvis.wang at sifive.com>
  Date:   2025-08-27 (Wed, 27 Aug 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
    M llvm/test/Transforms/LoopVectorize/RISCV/pr154103.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-gather-scatter.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-interleave.ll

  Log Message:
  -----------
  [RISCV][TTI] Implement getAddressComputationCost() in RISCV TTI. (#149955)

This patch implements the `getAddressComputationCost()` in RISCV TTI
which
make the gather/scatter with address calculation more expansive that
stride cost.

Note that the only user of `getAddressComputationCost()` with vector
type is in `VPWidenMemoryRecipe::computeCost()`. So this patch make some
LV tests changes.

I've checked the tests changes in LV and seems those changes can be
divided into two groups.
 * gather/scatter with uniform vector ptr, seems can be optimized to
 masked.load.
 * can optimize to stride load/store.



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