[PATCH] D111220: [X86][LV][TTI][Costmodel] LoopVectorizer: don't use `TTI::isLegalMaskedGather()` hook, introduce `TTI::shouldUseMaskedGatherForVectorization()`

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 15:23:16 PDT 2021


lebedev.ri added a comment.

In D111220#3048423 <https://reviews.llvm.org/D111220#3048423>, @lebedev.ri wrote:

> In D111220#3048397 <https://reviews.llvm.org/D111220#3048397>, @RKSimon wrote:
>
>> How good is the gather/scatter scalarization at splitting vectorized geps? Doing pointer math on the vector unit (probably using a single splatted base pointer) and then having to extract every pointer is going to be pretty poor compared to scalarizing and using LEA op on x86.
>
> Hmm it's not: https://godbolt.org/z/eYzP4ob3G
> I guess we might want to:
>
> 1. teach vectorcombine to split vector geps iff all their uses are extracts
> 2. schedule additional run of vectorcombine after the scalarizer
>
> But that doesn't affect cost model though, i believe.

Ok, D111363 <https://reviews.llvm.org/D111363> should deal with most of it,
but i'm not sure it's a hard blocker here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111220



More information about the llvm-commits mailing list