[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 Oct 11 07:37:18 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());
----------------
MacDue wrote:
Ah, I see what you mean. I've updated `tryToWiden()` to create live-in operands for the extract indices, and updated this to use that (rather than the underlying value). I've asserted that more than one index is unsupported, as this patch only allows widening structs of scalars.
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list