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

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 09:03:20 PDT 2022


dmgreen added a comment.

In D123494#3480166 <https://reviews.llvm.org/D123494#3480166>, @spatel wrote:

> 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.

Thanks. There is `D100486` that helps with X86 shuffles, but I'm not sure it applies to these cases quite yet.


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

https://reviews.llvm.org/D123494



More information about the llvm-commits mailing list