[all-commits] [llvm/llvm-project] 329b97: [SLP] Try to match reductions before trying to vec...

Valery Dmitriev via All-commits all-commits at lists.llvm.org
Mon Aug 29 13:42:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 329b972d416a3dc23ab3eacb17b884ead03af8e5
      https://github.com/llvm/llvm-project/commit/329b972d416a3dc23ab3eacb17b884ead03af8e5
  Author: Valery N Dmitriev <valery.n.dmitriev at intel.com>
  Date:   2022-08-29 (Mon, 29 Aug 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/redux-feed-buildvector.ll

  Log Message:
  -----------
  [SLP] Try to match reductions before trying to vectorize a vector build sequence.

This patch changes order of searching for reductions vs other vectorization possibilities.
The idea is if we do not match a reduction it won't be harmful for further attempts to
find vectorizable operations on a vector build sequences. But doing it in the opposite
order we have good chance to ruin opportunity to match a reduction later.
We also don't want to try vectorizing binary operations too early as 2-way vectorization
may effectively prohibit wider ones leading to producing less effective code.

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




More information about the All-commits mailing list