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;



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to