[PATCH] D57317: [DAGCombine] Deduplicate addcarry node using commutativity.

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 10:30:57 PST 2019


deadalnix marked an inline comment as done.
deadalnix added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2527
+  if (CSENode)
+    return SDValue(CSENode, 0);
+
----------------
RKSimon wrote:
> deadalnix wrote:
> > RKSimon wrote:
> > > We already do this in DAGCombiner::combine for plain commutative binops, is it worth generalizing that code?
> > The problem is that this is not a binary operation so it doesn't fit in the existing machinery. If this end up being common enough, we can generalize.
> OK - please add a TODO suggesting this. Should the ConstantSDNode handling be done here as well?
You mean moving a constant argument on RHS when it is on RHS ?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57317/new/

https://reviews.llvm.org/D57317





More information about the llvm-commits mailing list