[PATCH] D32756: [DAGCombine] Refactor common addcarry pattern.
Filipe Cabecinhas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 5 10:00:48 PDT 2017
filcab added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2188
+ CarryIn.getOpcode() == ISD::ADDCARRY &&
+ isNullConstant(CarryIn.getOperand(1))) {
+ auto Y = CarryIn.getOperand(0);
----------------
deadalnix wrote:
> filcab wrote:
> > 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?
> The method is called with argument in both order already. See line 2146 onward.
Should take care of the final addcarry, yes. But it's still missing the one above (*+0+Z), no?
https://reviews.llvm.org/D32756
More information about the llvm-commits
mailing list