[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 06:05:21 PST 2025
================
@@ -1506,6 +1514,8 @@ InstructionCost VPWidenRecipe::computeCost(ElementCount VF,
return Ctx.TTI.getArithmeticInstrCost(Instruction::Mul, VectorTy,
Ctx.CostKind);
}
+ case Instruction::ExtractValue:
+ return 0;
----------------
MacDue wrote:
If by the "right thing" you mean "Am I costing the return values based on the target-specific call ABI?" then the answer is no. I think the answer to that is _also_ "no" for non-struct-return functions too (I don't think there's any costing based on how the target passes arguments/returns values).
I don't really think that needs doing in this patch (which just adds basic support). Since nothing is using struct-return vectorization right now. Currently, it needs things to be manually annotated with `vector-function-abi-variant`, and I don't really think your example is a very realistic use case.
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list