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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 09:33:59 PDT 2017


Worth an assert? (quite possibly not - but figured I'd ask)

On Wed, May 10, 2017 at 11:28 AM Craig Topper via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170515/cba49e3c/attachment.html>


More information about the llvm-commits mailing list