[PATCH] D32925: [DAGCombine] (add/uaddo X, Carry) -> (addcarry X, 0, Carry)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 06:50:40 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1985
+ (V.getOpcode() == ISD::AND && isOneConstant(V.getOperand(1))))
+ V = V.getOperand(0);
+
----------------
As was discussed on D32916, the carry is a boolean that will respect TargetLowering::BooleanContent so we can't just accept any extension - it has to match the bool type.
================
Comment at: test/CodeGen/X86/add-of-carry.ll:16
+; CHECK-NEXT: addl %ecx, %edx
+; CHECK-NEXT: adcl %ecx, %eax
; CHECK-NEXT: retl
----------------
This is annoying....
https://reviews.llvm.org/D32925
More information about the llvm-commits
mailing list