[PATCH] D126273: [DAGCombiner][VP] Add DAGCombine for merging VP_FADD and VP_FMUL to VP_FMA.
Simon Moll via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 06:36:55 PDT 2022
simoll added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:23061
+ return false;
+ return AllowFusionGlobally || N->getFlags().hasAllowContract();
+ };
----------------
RKSimon wrote:
> It'd be very useful if we pulled stuff like this out and shared it between all the various FMA generating combines.
Yes. It is possible to lift the existing DAGCombiner Patterns to work on VP SDNodes as well as on regular SDNodes.
I've implemented this in the LLVM stack for SX-Aurora under the LLVM license, ie it could be upstreamed:
https://github.com/sx-aurora-dev/llvm-project/blob/feature/generalized_pattern_rewriting/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp#L13859
You could rephrase this patch using the generalized pattern-rewriting technique. I'd happy to help with that!
The same applies to https://reviews.llvm.org/D121187
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126273/new/
https://reviews.llvm.org/D126273
More information about the llvm-commits
mailing list