[all-commits] [llvm/llvm-project] 5493f8: [VectorCombine] Improve shuffle select shuffle-of-...

David Green via All-commits all-commits at lists.llvm.org
Tue Jul 5 09:16:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5493f8fc59ca9cc6fc14da8e6aafe6a52fb9ebc0
      https://github.com/llvm/llvm-project/commit/5493f8fc59ca9cc6fc14da8e6aafe6a52fb9ebc0
  Author: David Green <david.green at arm.com>
  Date:   2022-07-05 (Tue, 05 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/AArch64/select-shuffle.ll

  Log Message:
  -----------
  [VectorCombine] Improve shuffle select shuffle-of-shuffles

This in an extension to the code added in D123911 which added vector
combine folding of shuffle-select patterns, attempting to reduce the
total amount of shuffling required in patterns like:
  %x = shuffle %i1, %i2
  %y = shuffle %i1, %i2
  %a = binop %x, %y
  %b = binop %x, %y
  shuffle %a, %b, selectmask

This patch extends the handing of shuffles that are dependent on one
another, which can arise from the SLP vectorizer, as-in:
  %x = shuffle %i1, %i2
  %y = shuffle %x

The input shuffles can also be emitted, in which case they are treated
like identity shuffles. This patch also attempts to calculate a better
ordering of input shuffles, which can help getting lower cost input
shuffles, pushing complex shuffles further down the tree.

This is a recommit with some additional checks for supported forms and
out-of-bounds mask elements, with some extra tests.

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




More information about the All-commits mailing list