[all-commits] [llvm/llvm-project] 8e5a5b: [InstCombine] Fold for masked scatters to a unifor...

CarolineConcatto via All-commits all-commits at lists.llvm.org
Fri Jan 14 01:56:41 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e5a5b619d34c7846e35d219c0747b9c29654f15
      https://github.com/llvm/llvm-project/commit/8e5a5b619d34c7846e35d219c0747b9c29654f15
  Author: Caroline Concatto <caroline.concatto at arm.com>
  Date:   2022-01-14 (Fri, 14 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/masked_intrinsics.ll

  Log Message:
  -----------
  [InstCombine] Fold for masked scatters to a uniform address

When masked scatter intrinsic does a uniform store to a destination
address from a source vector, and in this case, the mask is all one value.
This patch replaces the masked scatter with an extracted element of the
last lane of the source vector and stores it in the destination vector.
This patch also folds when the value in the masked scatter is a splat.
In this case, the mask cannot be all zero, and it folds to a scalar store
of the value in the destination pointer.

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




More information about the All-commits mailing list