diff options
author | David Sherwood <david.sherwood@arm.com> | 2024-05-17 12:58:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 12:58:14 +0100 |
commit | 0ad275c1588065c9f4ef45a6a88f062182ad446b (patch) | |
tree | 60874e5c6e4b8a3370e898291556c1b91d4a1d34 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 98deedae929fce01f0c40d5a55d00e93fb121981 (diff) | |
download | llvm-0ad275c1588065c9f4ef45a6a88f062182ad446b.zip llvm-0ad275c1588065c9f4ef45a6a88f062182ad446b.tar.gz llvm-0ad275c1588065c9f4ef45a6a88f062182ad446b.tar.bz2 |
[InstCombine] Fold vector.reduce.op(vector.reverse(X)) -> vector.reduce.op(X) (#91743)
For all of the following reductions:
vector.reduce.or
vector.reduce.and
vector.reduce.xor
vector.reduce.add
vector.reduce.mul
vector.reduce.umin
vector.reduce.umax
vector.reduce.smin
vector.reduce.smax
vector.reduce.fmin
vector.reduce.fmax
if the input operand is the result of a vector.reverse then we can
perform a reduction on the vector.reverse input instead since the answer
is the same. If the reassociation is permitted we can also do the same
folds for these:
vector.reduce.fadd
vector.reduce.fmul
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions