[PATCH] D85416: [ScalarizeMaskedMemIntrin] Scalarize constant mask expandload as shuffle(build_vector,pass_through)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 03:04:32 PDT 2020


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, efriedma.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
RKSimon requested review of this revision.

As noticed on D66004 <https://reviews.llvm.org/D66004>, scalarization of an expandload with a constant mask as a chain of irregular loads+inserts makes it difficult to optimize before lowering, resulting in difficulties in merging loads etc.

This patch instead scalarizes the expansion to a build_vector(load0, load1, undef, load2,....) style pattern and then performs a blend shuffle with the pass through vector. This allows us to more easily make use of all the build_vector combines, merging of consecutive loads etc.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85416

Files:
  llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
  llvm/test/CodeGen/X86/masked_expandload.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85416.283550.patch
Type: text/x-patch
Size: 9035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200806/4ffdf954/attachment.bin>


More information about the llvm-commits mailing list