[PATCH] D60975: Convert a masked.gather of at most one element to a masked.load

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 12:47:22 PDT 2019


craig.topper added a comment.

In D60975#1476052 <https://reviews.llvm.org/D60975#1476052>, @spatel wrote:

> In the generic case, we're creating a masked load of a scalar (although as noted inline, there's apparently no support or test for that pattern). But I don't know what the codegen for a <1 x X> masked load would be (do we cmp/br around the load since it's not speculatable?). Someone else with masked load lowering knowledge (@craig.topper @efriedma ?) should also review this.


A single <1 x X> masked load should get scalarized to a compare and branch sequence by the ScalarizeMaskedMemIntrinsic pass. This was done because the type legalizer wants to scalarize 1x vectors. So I have X86's target transform info reporting illegal for 1x vectors. Not sure if it would make sense to custom widen that instead.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60975





More information about the llvm-commits mailing list