[llvm] r302701 - [APInt] Remove check for single word since single word was handled earlier in the function. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 11:15:14 PDT 2017


Author: ctopper
Date: Wed May 10 13:15:14 2017
New Revision: 302701

URL: http://llvm.org/viewvc/llvm-project?rev=302701&view=rev
Log:
[APInt] Remove check for single word since single word was handled earlier in the function. NFC

Modified:
    llvm/trunk/lib/Support/APInt.cpp

Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=302701&r1=302700&r2=302701&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Wed May 10 13:15:14 2017
@@ -1697,8 +1697,8 @@ void APInt::udivrem(const APInt &LHS, co
 
   if (lhsWords == 1 && rhsWords == 1) {
     // There is only one word to consider so use the native versions.
-    uint64_t lhsValue = LHS.isSingleWord() ? LHS.U.VAL : LHS.U.pVal[0];
-    uint64_t rhsValue = RHS.isSingleWord() ? RHS.U.VAL : RHS.U.pVal[0];
+    uint64_t lhsValue = LHS.U.pVal[0];
+    uint64_t rhsValue = RHS.U.pVal[0];
     Quotient = APInt(LHS.getBitWidth(), lhsValue / rhsValue);
     Remainder = APInt(LHS.getBitWidth(), lhsValue % rhsValue);
     return;




More information about the llvm-commits mailing list