llvm-project/llvm/test/Transforms/VectorCombine
David Green ded8187e35 [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
2022-04-28 19:46:12 +01:00
..
AArch64 [VectorCombine] Try to reduce shuffle cost for commutative reduction operands 2022-04-28 19:46:12 +01:00
AMDGPU [VectorCombine] Insert addrspacecast when crossing address space boundaries 2022-03-24 19:08:08 +00:00
Hexagon [NewPM][test] Use -passes syntax in VectorCombine lit tests 2021-10-20 15:16:17 +02:00
X86 [VectorCombine] Insert addrspacecast when crossing address space boundaries 2022-03-24 19:08:08 +00:00
load-insert-store.ll [NewPM][test] Use -passes syntax in VectorCombine lit tests 2021-10-20 15:16:17 +02:00