[llvm-branch-commits] [llvm] [TTI][SLP] Pass the scalars of the lanes to getArithmeticInstrCost (PR #241758)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Nov 18 21:56:39 PST 2026
================
@@ -1633,12 +1633,16 @@ class TargetTransformInfo {
/// provide even more information.
/// \p TLibInfo is used to search for platform specific vector library
/// functions for instructions that might be converted to calls (e.g. frem).
+ /// \p Scalars are the scalar instructions of the lanes of a vector operation,
+ /// if known. The target may use them for the properties that differ between
+ /// the lanes, where \p CtxI shows only one lane.
LLVM_ABI InstructionCost getArithmeticInstrCost(
unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind,
TTI::OperandValueInfo Opd1Info = {TTI::OK_AnyValue, TTI::OP_None},
TTI::OperandValueInfo Opd2Info = {TTI::OK_AnyValue, TTI::OP_None},
ArrayRef<const Value *> Args = {}, const Instruction *CtxI = nullptr,
- const TargetLibraryInfo *TLibInfo = nullptr) const;
+ const TargetLibraryInfo *TLibInfo = nullptr,
+ ArrayRef<const Value *> Scalars = {}) const;
----------------
michaelselehov wrote:
Probably you're right. I hope it won't be me making the change. Unless you want me to do it in the scope of this PR.
https://github.com/llvm/llvm-project/pull/241758
More information about the llvm-branch-commits
mailing list