diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-04-25 16:48:14 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-04-25 16:48:14 +0000 |
commit | 2d9afa77453f288f651750ac5ad7bce9c7b66abe (patch) | |
tree | 800a1c015a1a9be794746ff3e221179d85e81913 /llvm/lib/Analysis/ValueTracking.cpp | |
parent | da8ff4181c330e9d5ec8f25ff2b738d2a599ea46 (diff) | |
download | bcm5719-llvm-2d9afa77453f288f651750ac5ad7bce9c7b66abe.tar.gz bcm5719-llvm-2d9afa77453f288f651750ac5ad7bce9c7b66abe.zip |
[ValueTracking] Use APInt::operator|=(uint64_t) instead of creating a temporary APInt. NFC
llvm-svn: 301325
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 5067fbc4979..02db651a1f9 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), |