[PATCH] D38942: [DAG] Promote ADDCARRY / SUBCARRY
Roger Ferrer Ibanez via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 00:49:20 PDT 2017
rogfer01 added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:777-787
+ SDValue LHS = GetPromotedInteger(N->getOperand(0));
+ SDValue RHS = GetPromotedInteger(N->getOperand(1));
+
+ EVT ValueVTs[] = { LHS.getValueType(), N->getValueType(1) };
+
+ SDValue Res = DAG.getNode(N->getOpcode(), SDLoc(N),
+ DAG.getVTList(ValueVTs), LHS, RHS, N->getOperand(2));
----------------
This looks like a lot like the "dual" of `PromoteIntRes_Overflow` but replacing the users of `:1` (instead of `:0`). It generates correct code in Arm but I may be missing some subtlety here.
https://reviews.llvm.org/D38942
More information about the llvm-commits
mailing list