diff options
author | David Green <david.green@arm.com> | 2022-04-28 19:46:12 +0100 |
---|---|---|
committer | David Green <david.green@arm.com> | 2022-04-28 19:46:12 +0100 |
commit | ded8187e353f7c6c5bb70239c07110eccc38a579 (patch) | |
tree | a4041684b047b1ed22bb77d151a3cd2f936d188c /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | 9a4472c56cbb4ea15be3e9a537e4ebdfc200a52c (diff) | |
download | llvm-ded8187e353f7c6c5bb70239c07110eccc38a579.zip llvm-ded8187e353f7c6c5bb70239c07110eccc38a579.tar.gz llvm-ded8187e353f7c6c5bb70239c07110eccc38a579.tar.bz2 |
[VectorCombine] Try to reduce shuffle cost for commutative reduction operands
Given a shuffle feeding a commutative reduction, the lane ordering of
the shuffle will not alter the result. This is also true if there are a
number of operations between the reduction and the shuffle, providing
they only operate lane-wise. This patch searches for cases like that in
Vector Combine, allowing us to check the cost of the shuffle vs an
in-order identity shuffle and replace the order if possible. This only
handles a single shuffle at the moment to keep things simple, and is
able to ignore splats that produce results where every result is the
same.
This is a more powerful version of a combine that already happens in
instrcombine, capable of optimizing more cases by looking through more
instructions and being able to cost the shuffle.
Differential Revision: https://reviews.llvm.org/D123494
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions