[PATCH] D57302: [DAGCombine] More diamond carry pattern optimization.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 03:22:52 PDT 2019


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2590
+/**
+ * If we are facing some sort of ddamoni carry propapagtion patternq try to
+ * break it up to generate something like:
----------------
ddamoni ? paternq?


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2670
+    SDLoc DL(N);
+    auto NewY = DAG.getNode(ISD::ADDCARRY, DL, Carry0->getVTList(), A, B, Z);
+    Combiner.AddToWorklist(NewY.getNode());
----------------
Don't use auto


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2675
+                       NewY.getValue(1));
+  }
+
----------------
Instead of 'DoIt' - would it be better to move this into a lambda and just call it in each of the cases above?


================
Comment at: test/CodeGen/X86/subcarry.ll:107
+; CHECK-NEXT:    setb %dl
+; CHECK-NEXT:    movzbl %dl, %edx
 ; CHECK-NEXT:    notq %rcx
----------------
Whats your plan to deal with this regression?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57302





More information about the llvm-commits mailing list