[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 03:38:07 PST 2024


https://github.com/sdesmalen-arm commented:

To me the general approach set out in this patch makes sense, at least as a first step. VPlan currently makes assumptions that recipes return a single value as most are deriving from the `VPSingleDefRecipe`, so widening the IR extractvalue operation seems the logical step to take.

@fhahn what would be the advantages of having the recipe return multiple results? It wasn't entirely clear to me what changes you thought are necessary to `VPTransformInfo`, or what you meant by:
> VPWidenCallRecipe could define one VPValue per element vector and take care of splitting up the return value directly, which may also allow more accurately estimating the cost overhead

The reason I ask is because we've had to disable vectorization for loops with `sincos` and this patch helps re-enable the lost capability. If modelling this without widening `extractvalue` is advantageous we should of course do so, but I'd prefer to take the refactoring off the critical path, especially since @macdue demonstrated this is non-trivial.

https://github.com/llvm/llvm-project/pull/109833


More information about the llvm-commits mailing list