[PATCH] D32755: [DAGCombine] (addcarry (add|uaddo X, Y), 0, Carry) -> (addcarry X, Y, Carry)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 15:29:04 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2158
+  // If the flag result is dead, we can do transform that invalidate it.
+  if (!N->hasAnyUseOfValue(1)) {
+    // (addcarry (add|uaddo X, Y), 0, Carry) -> (addcarry X, Y, Carry)
----------------
Might it be quicker if we check for ISD::ADD/ISD::UADDO first before calling the heavier isNullConstan/hasAnyUseOfValue checks?


https://reviews.llvm.org/D32755





More information about the llvm-commits mailing list