diff options
author | Zhou Sheng <zhousheng00@gmail.com> | 2007-03-12 16:54:56 +0000 |
---|---|---|
committer | Zhou Sheng <zhousheng00@gmail.com> | 2007-03-12 16:54:56 +0000 |
commit | edd089c86a58d82a290701bedf5284489eae1ec5 (patch) | |
tree | 1bd9650e8bd9b098c9a871050f802eb83b9b84a0 /lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 430f626937c15bdad1d00f155d78a9273514c695 (diff) |
Avoid to assert on "(KnownZero & KnownOne) == 0".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index abb279f774..62a7a8dea4 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -979,7 +979,7 @@ static bool MaskedValueIsZero(Value *V, uint64_t Mask, unsigned Depth = 0) { /// this predicate to simplify operations downstream. Mask is known to be zero /// for bits that V cannot have. static bool MaskedValueIsZero(Value *V, const APInt& Mask, unsigned Depth = 0) { - APInt KnownZero(Mask), KnownOne(Mask); + APInt KnownZero(Mask.getBitWidth(), 0), KnownOne(Mask.getBitWidth(), 0); ComputeMaskedBits(V, Mask, KnownZero, KnownOne, Depth); assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); return (KnownZero & Mask) == Mask; |