[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Zhou Sheng
zhousheng00 at gmail.com
Mon Mar 12 09:55:13 PDT 2007
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.653 -> 1.654
---
Log message:
Avoid to assert on "(KnownZero & KnownOne) == 0".
---
Diffs of the changes: (+1 -1)
InstructionCombining.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.653 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.654
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.653 Mon Mar 12 00:44:52 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 12 11:54:56 2007
@@ -979,7 +979,7 @@
/// 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;
More information about the llvm-commits
mailing list