[all-commits] [llvm/llvm-project] c0c3b9: [ScalarizeMaskedMemIntrin] Scalarize constant mask...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Aug 10 03:06:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c0c3b9a25feec84e739cc3a2b30e1ac336648799
      https://github.com/llvm/llvm-project/commit/c0c3b9a25feec84e739cc3a2b30e1ac336648799
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
    M llvm/test/CodeGen/X86/masked_expandload.ll

  Log Message:
  -----------
  [ScalarizeMaskedMemIntrin] Scalarize constant mask expandload as shuffle(build_vector,pass_through)

As noticed on D66004, scalarization of an expandload with a constant mask as a chain of irregular loads+inserts makes it tricky 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.

Differential Revision: https://reviews.llvm.org/D85416




More information about the All-commits mailing list