[all-commits] [llvm/llvm-project] 19a1e2: [VectorCombine] Improve shuffle select shuffle-of-...

David Green via All-commits all-commits at lists.llvm.org
Mon Jul 4 05:38:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19a1e20b8a0f69da2a871eae6cbd03d1314ee02d
      https://github.com/llvm/llvm-project/commit/19a1e20b8a0f69da2a871eae6cbd03d1314ee02d
  Author: David Green <david.green at arm.com>
  Date:   2022-07-04 (Mon, 04 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.

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




More information about the All-commits mailing list