[PATCH] D35192: [ARM] Use ADDCARRY / SUBCARRY

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 02:43:03 PDT 2017


rogfer01 added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:7439-7443
+  // This converts the boolean value carry into the carry flag by doing
+  // ARMISD::ADDC Carry, ~0
+  APInt NegOne = APInt::getAllOnesValue(CarryVT.getScalarSizeInBits());
+  Carry = DAG.getNode(ARMISD::ADDC, DL, DAG.getVTList(CarryVT, MVT::i32), Carry,
+                      DAG.getConstant(NegOne, DL, CarryVT));
----------------
This is usually combined into `(ARMISD::SUBC Carry, 1)` so I think that I can save a few combiners that have to take into account this node before being combined.

Does this sound sensible?


https://reviews.llvm.org/D35192





More information about the llvm-commits mailing list