projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
430f626
)
Avoid to assert on "(KnownZero & KnownOne) == 0".
author
Zhou Sheng
<zhousheng00@gmail.com>
Mon, 12 Mar 2007 16:54:56 +0000
(16:54 +0000)
committer
Zhou Sheng
<zhousheng00@gmail.com>
Mon, 12 Mar 2007 16:54:56 +0000
(16:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35062
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index abb279f7740e592e5db9ce12857382248470d228..62a7a8dea4d1e372b4d51b397ebf55bb3215b59c 100644
(file)
--- 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;