[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 14:10:05 PDT 2024
================
@@ -1277,6 +1277,13 @@ void VPWidenRecipe::execute(VPTransformState &State) {
State.addMetadata(V, dyn_cast_or_null<Instruction>(getUnderlyingValue()));
break;
}
+ case Instruction::ExtractValue: {
+ Value *Op = State.get(getOperand(0));
+ Value *Extract = Builder.CreateExtractValue(
+ Op, cast<ExtractValueInst>(getUnderlyingValue())->getIndices());
----------------
fhahn wrote:
Depends on how the recipe is constructed (would be helpful to have a test that prints a VPlan with the recipes to see the operands). But as the indices are not Value * operands of the instruction, they might need to be added as operands manually. (also would be good to make sure there are tests with multiple indices?)
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list