[PATCH] D32925: [DAGCombine] (add/uaddo X, Carry) -> (addcarry X, 0, Carry)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 03:44:26 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1976
+
+  // First, peel away truncation and and due to legalization.
+  while (true) {
----------------
```
// First, peel away TRUNCATE/ZERO_EXTEND/AND nodes due to legalization.
```


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2059
+  // (add X, Carry) -> (addcarry X, 0, Carry)
+  if (auto Carry = getAsCarry(TLI, N1))
+    return DAG.getNode(ISD::ADDCARRY, DL,
----------------
use SDValue not auto 


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2148
+  // (uaddo X, Carry) -> (addcarry X, 0, Carry)
+  if (auto Carry = getAsCarry(TLI, N1))
+    return DAG.getNode(ISD::ADDCARRY, SDLoc(N), N->getVTList(), N0,
----------------
use SDValue not auto 


https://reviews.llvm.org/D32925





More information about the llvm-commits mailing list