[llvm] [TTI] Don't drop VP intrinsic args when delegating to non-vp equivalent (PR #147677)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 18:13:21 PDT 2025
================
----------------
lukel97 wrote:
IIUC the type based costing is needed for places like the LoopVectorizer where we need to cost things that don't yet have `Value`s materialised, e.g. VPRecipeBase::computeCost.
The value based costing is used by other transforms that actually have a `Value` at hand, e.g. SLPVectorizer/LoopUnroll/VectorCombine etc.
And for some types of intrinsics and instructions, knowing the value of an operand can actually make the cost more accurate, e.g. if you know the index of a insertelement or the mask of a shufflevector, it can be much cheaper.
https://github.com/llvm/llvm-project/pull/147677
More information about the llvm-commits
mailing list