[llvm] r301325 - [ValueTracking] Use APInt::operator|=(uint64_t) instead of creating a temporary APInt. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 09:48:15 PDT 2017
Author: ctopper
Date: Tue Apr 25 11:48:14 2017
New Revision: 301325
URL: http://llvm.org/viewvc/llvm-project?rev=301325&view=rev
Log:
[ValueTracking] Use APInt::operator|=(uint64_t) instead of creating a temporary APInt. NFC
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=301325&r1=301324&r2=301325&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Tue Apr 25 11:48:14 2017
@@ -2239,7 +2239,7 @@ static unsigned ComputeNumSignBitsImpl(c
// 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(c
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),
More information about the llvm-commits
mailing list