From: Craig Topper Date: Tue, 25 Apr 2017 16:48:14 +0000 (+0000) Subject: [ValueTracking] Use APInt::operator|=(uint64_t) instead of creating a temporary APInt... X-Git-Tag: llvmorg-5.0.0-rc1~6727 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d9afa77453f288f651750ac5ad7bce9c7b66abe;p=platform%2Fupstream%2Fllvm.git [ValueTracking] Use APInt::operator|=(uint64_t) instead of creating a temporary APInt. NFC llvm-svn: 301325 --- diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 5067fbc..02db651 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -2239,7 +2239,7 @@ static unsigned ComputeNumSignBitsImpl(const Value *V, unsigned Depth, // If the input is known to be 0 or 1, the output is 0/-1, which is all // sign bits set. - if ((KnownZero | APInt(TyBits, 1)).isAllOnesValue()) + if ((KnownZero | 1).isAllOnesValue()) return TyBits; // If we are subtracting one from a positive number, there is no carry @@ -2263,7 +2263,7 @@ static unsigned ComputeNumSignBitsImpl(const Value *V, unsigned Depth, computeKnownBits(U->getOperand(1), KnownZero, KnownOne, Depth + 1, Q); // If the input is known to be 0 or 1, the output is 0/-1, which is all // sign bits set. - if ((KnownZero | APInt(TyBits, 1)).isAllOnesValue()) + if ((KnownZero | 1).isAllOnesValue()) return TyBits; // If the input is known to be positive (the sign bit is known clear),