[PATCH] D141870: [DAG] Fold fadd(vecreduce(a), vecreduce(b)) into vecreduce(fadd(a,b))

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 13:02:25 PST 2023


dmgreen created this revision.
dmgreen added reviewers: spatel, RKSimon, SjoerdMeijer.
Herald added subscribers: StephenFan, ecnelises, hiraditya.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

So long as the fadd is reassoc and nosignzero, we can reassociate the double vecreduce from `fadd(vecreduce(a), vecreduce(b))` to `vecreduce(fadd(a,b))`, saving some instructions.


https://reviews.llvm.org/D141870

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/sve-fp-reduce.ll
  llvm/test/CodeGen/AArch64/vecreduce-fadd.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141870.489595.patch
Type: text/x-patch
Size: 5009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230116/a74c31ca/attachment.bin>


More information about the llvm-commits mailing list