[PATCH] D118919: [DAGCombiner] Fold vecreduce_or/and if operand is insert_subvector.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 3 09:09:45 PST 2022
sdesmalen created this revision.
Herald added subscribers: ctetreau, ecnelises, hiraditya.
sdesmalen requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999.
Herald added a project: LLVM.
Fold:
vecreduce_or(insert_subvec(zeroinitializer, vec))
-> vecreduce_or(vec)
vecreduce_and(insert_subvec(allones, vec))
-> vecreduce_and(vec)
vecreduce_and/or(insert_subvec(undef, vec))
-> vecreduce_and/or(vec)
This is useful for SVE which uses insert/extract subvector
to convert fixed-width to/from scalable vectors.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118919
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/sve-vecreduce-fold.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118919.405678.patch
Type: text/x-patch
Size: 5268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220203/28a0ba71/attachment.bin>
More information about the llvm-commits
mailing list