[PATCH] D32756: [DAGCombine] Refactor common addcarry pattern.

Filipe Cabecinhas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 08:32:48 PDT 2017


filcab added a comment.

You should probably also mention the PR number on the commit message.
Does this trigger often, btw?



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2188
+      CarryIn.getOpcode() == ISD::ADDCARRY &&
+      isNullConstant(CarryIn.getOperand(1))) {
+    auto Y = CarryIn.getOperand(0);
----------------
Shouldn't we allow both `(addcarry *, 0, Z)` and `(addcarry 0, *, Z)`?
Same for the final one, we could have X+0(+C) or 0+X(+C), no?


https://reviews.llvm.org/D32756





More information about the llvm-commits mailing list