[PATCH] D123494: [VectorCombine] Find and remove shuffles from commutative reductions

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 08:08:11 PDT 2022


spatel accepted this revision.
spatel added a comment.

LGTM - I think the patch title would be better as something like "[VectorCombine] try to reduce shuffle cost for commutative reduction operands"

I tried testing with x86 and opened: https://github.com/llvm/llvm-project/issues/55170

There may be some generalization where we recognize other operations that don't care about element order. 
For example, if we're testing if all elements are equal to zero:
https://alive2.llvm.org/ce/z/DFk-aC

We don't appear to optimize even that easy unary shuffle case in any pass currently.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123494/new/

https://reviews.llvm.org/D123494



More information about the llvm-commits mailing list