summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorZhou Sheng <zhousheng00@gmail.com>2007-03-12 16:54:56 +0000
committerZhou Sheng <zhousheng00@gmail.com>2007-03-12 16:54:56 +0000
commitbe171ee5cd92f7900dbb26ad7cb68d7599ec7e64 (patch)
treeb8377567ce0a571560c92859a3d1d870ecb9db34 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp
parentb3e00c4656c69138f6d687584e9859a8a89d9b38 (diff)
downloadbcm5719-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.cpp2
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;
OpenPOWER on IntegriCloud