[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 07:39:51 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:
We can't reach here with multiple indices (due to the limits on struct-vectorization). Writing the for-loop was just a little easier. Anyway, I've removed this and added an extra assert now :+1:
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list