[PATCH] D61411: [SelectionDAG] Expand ADD/SUBCARRY

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 17:01:24 PDT 2019


leonardchan added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:3300
+    SDValue Overflow2 = IsAdd ? DAG.getSetCC(dl, VT, Sum2, Zero, ISD::SETEQ)
+                              : DAG.getSetCC(dl, VT, Sum, Zero, ISD::SETEQ);
+
----------------
efriedma wrote:
> Are you sure this is right?  The comment is correct, but there's only an overflow if the carry is set and the result is zero.
My bad, you're right. Updated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61411





More information about the llvm-commits mailing list