[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 08:06:37 PDT 2024
MacDue wrote:
> VPlan supports recipes that produce multiple results, e.g. as `VPInterleaveRecipe`. The recipe then would take care of de-interleaving the result, this would help avoid the need to modify various places in VPTransformState.
I'm a little unclear on how this would work. Do you mean making `VPWidenCallRecipe` return a value for each element of the struct? I'm not sure what to do around the `extractvalues` in the original IR/plan, I guess you'd have to replace them with the widen call recipe while constructing the plan?
> I might have missed it, but could you make sure that there are tests with struct return values that cannot be widened?
There's a few tests in `llvm/test/Transforms/LoopVectorize/struct-return.ll` (`negative_mixed_element_type_struct_return`, `test_named_struct_return`, `test_overflow_intrinsic`.
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list