[all-commits] [llvm/llvm-project] f2d5b3: [RISCV] Add cost for @llvm.vector.splice.{left, rig...

Luke Lau via All-commits all-commits at lists.llvm.org
Mon Feb 9 00:11:37 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f2d5b3952b3fde599e303c3fdf8fb4d40f113a4d
      https://github.com/llvm/llvm-project/commit/f2d5b3952b3fde599e303c3fdf8fb4d40f113a4d
  Author: Luke Lau <luke at igalia.com>
  Date:   2026-02-09 (Mon, 09 Feb 2026)

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

  Log Message:
  -----------
  [RISCV] Add cost for @llvm.vector.splice.{left,right} (#179219)

Currently vector splice intrinsics are costed through getShuffleCost
when the offset is fixed. When the offset is variable though we can't
use a shuffle mask so it currently returns invalid.

This implements the cost in RISCVTTIImpl::getIntrinsicInstrCost as the
cost of a slideup and a slidedown, which matches the codegen.

It also implements the type based cost whenever the offset argument
isn't available.

It may be possible to reduce the cost in future when one of the vector
operands is known to be poison, in which case we only generate a single
slideup or slidedown.



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