[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 00:01:12 PST 2025
================
@@ -1468,6 +1468,15 @@ class TargetTransformInfo {
TTI::TargetCostKind CostKind,
unsigned Index = -1) const;
+ /// \return The expected of aggregate inserts and extracts. Use an empty
+ /// ArrayRef to indicate that there is no information on the indices. This is
+ /// used when the instruction is not available; a typical use case is to
+ /// provision the cost of vectorization/scalarization in vectorizer passes.
+ InstructionCost getInsertExtractValueCost(unsigned Opcode, Type *AggType,
----------------
davemgreen wrote:
Would we ever expect it to be non-zero from the vectorizer? I think I would expect the cost of say an add.with.overflow to include the extract cost in it's own cost, if one was needed. Perhaps for calls it would depend on the calling convention, with multiple values often being returned in multiple registers?
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list