[all-commits] [llvm/llvm-project] 03783f: [SLP] sort candidates to increase chance of optima...

RotateRight via All-commits all-commits at lists.llvm.org
Thu Sep 17 05:49:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 03783f19dc78fc45fd987f892c314578b5e52d78
      https://github.com/llvm/llvm-project/commit/03783f19dc78fc45fd987f892c314578b5e52d78
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-09-17 (Thu, 17 Sep 2020)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/compare-reduce.ll

  Log Message:
  -----------
  [SLP] sort candidates to increase chance of optimal compare reduction

This is one (small) part of improving PR41312:
https://llvm.org/PR41312

As shown there and in the smaller tests here, if we have some member of the
reduction values that does not match the others, we want to push it to the
end (bring the matching members forward and together).

In the regression tests, we have 5 candidates for the 4 slots of the reduction.
If the one "wrong" compare is grouped with the others, it prevents forming the
ideal v4i1 compare reduction.

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




More information about the All-commits mailing list