[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 01:58:02 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:
I don't think so, I did look around (including `getVectorInstrCost()`), but it does not look like there's a hook for this right now. `getVectorInstrCost()` is currently only for `insertelement` and `extractelement`. I guess I could modify this hook to handle it, or add a new one though?
https://github.com/llvm/llvm-project/blob/455b3d6df20c9bb50cdba66fd2f3202bc43eb4ac/llvm/lib/Analysis/TargetTransformInfo.cpp#L1079-L1084
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list