[PATCH] D144128: [SLP] Check with target before vectorizing GEP Indices

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 07:56:31 PDT 2023


fhahn added a comment.

In D144128#4199448 <https://reviews.llvm.org/D144128#4199448>, @zjaffal wrote:

> Hi this patch is causing some regressions. 
> If you look at the example I attached the code sequence is no longer being vectorised when it is beneficial to do so.
> https://godbolt.org/z/MTex1z73K
>
> Can you take a look please?

To add to what @zjaffal said, I am curious why the current cost-modeling wouldn't be sufficient to prevent cases where vectorizing GEPs would be not profitable?

The case @zjaffal shared requires a more costly vector GEP, but the cost is offset by the benefits from vectorizing the rest of the tree.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144128/new/

https://reviews.llvm.org/D144128



More information about the llvm-commits mailing list