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 | be171ee5cd92f7900dbb26ad7cb68d7599ec7e64 (patch) | |
tree | b8377567ce0a571560c92859a3d1d870ecb9db34 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | b3e00c4656c69138f6d687584e9859a8a89d9b38 (diff) | |
download | bcm5719-llvm-be171ee5cd92f7900dbb26ad7cb68d7599ec7e64.tar.gz bcm5719-llvm-be171ee5cd92f7900dbb26ad7cb68d7599ec7e64.zip |
Avoid to assert on "(KnownZero & KnownOne) == 0".
llvm-svn: 35062
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index abb279f7740..62a7a8dea4d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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; |