aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorDavid Sherwood <david.sherwood@arm.com>2024-05-17 12:58:14 +0100
committerGitHub <noreply@github.com>2024-05-17 12:58:14 +0100
commit0ad275c1588065c9f4ef45a6a88f062182ad446b (patch)
tree60874e5c6e4b8a3370e898291556c1b91d4a1d34 /clang/lib/CodeGen/CodeGenFunction.cpp
parent98deedae929fce01f0c40d5a55d00e93fb121981 (diff)
downloadllvm-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