[PATCH] D108138: [SimplifyCFG] Remove switch statements before vectorization

David Sherwood via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 17 03:12:46 PDT 2021


david-arm added a comment.

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

> I'm not sure i'm sold on this, even though i'm aware that selects hurt vectorization.
> How does this Simplify the CFG? I think it would be best to teach LV selects,
> or at worst do this in LV itself.

Hi @lebedev.ri, I'm under the impression that the vectoriser has a policy of never making scalar transformations so I doubt it would be acceptable to do this in the vectoriser pass. I think the only realistic alternative is to teach LV how to vectorise switch statements and create the vector compares and selects directly in the code, or scalarise them in the vector loop with creation of new blocks. @fhahn and @craig.topper do you have any thoughts on this or preference?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108138



More information about the cfe-commits mailing list