[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 05:15:56 PST 2025
================
@@ -8652,6 +8660,15 @@ VPWidenRecipe *VPRecipeBuilder::tryToWiden(Instruction *I,
NewOps[1] = GetConstantViaSCEV(NewOps[1]);
}
return new VPWidenRecipe(*I, make_range(NewOps.begin(), NewOps.end()));
+ }
+ case Instruction::ExtractValue: {
+ SmallVector<VPValue *> NewOps(Operands);
+ Type *I32Ty = IntegerType::getInt32Ty(I->getContext());
+ for (unsigned Idx : cast<ExtractValueInst>(I)->getIndices())
----------------
MacDue wrote:
It didn't seem necessary to assert that here (as it's easy just to make the `extractvalue` node). Where it matters (e.g. `VPWidenRecipe::execute`) I do assert that there's one index.
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list