[PATCH] D60522: [KnownBits] Add computeForAddCarry()

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 01:44:20 PDT 2019


RKSimon added inline comments.


================
Comment at: llvm/lib/Support/KnownBits.cpp:35
   APInt CarryKnownUnion = std::move(CarryKnownZero) | CarryKnownOne;
   APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion;
 
----------------
Are we gaining much from using the std::move? It reduces grokability and in most cases we'll be dealing with APInts representing i64 or less so its not heap allocated.


================
Comment at: llvm/unittests/Support/KnownBitsTest.cpp:49
+
+TEST(KnownBitsTest, AddCarryExhausive) {
+  unsigned Bits = 4;
----------------
AddCarryExhaustive


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60522/new/

https://reviews.llvm.org/D60522





More information about the llvm-commits mailing list