[llvm] [VectorCombine] Optimize vector combine in fold binop of reduction (PR #179416)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 04:12:39 PST 2026
Anjian-Wen wrote:
> When is this expected to be better? Some architectures have efficient instructions for add(vecreduce), and this change might just end up messing that up.
Thanks for your review! like the .ll test, this patch supposed to change the order of the pattern like `(ReduceX - Y) + ReduceC -> (ReduceX + ReduceC) - Y`, and give it a chance for foldBinopOfReductions to decide whether to fold. I don't know if I understand it well, If you mean add two vecreduce, this patch won't change that kind of pattern. If not, could you help give any example .ll?
https://github.com/llvm/llvm-project/pull/179416
More information about the llvm-commits
mailing list