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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 10:37:31 PST 2019


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2527
+  if (CSENode)
+    return SDValue(CSENode, 0);
+
----------------
deadalnix wrote:
> 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 ?
yes


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