[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu May 4 10:33:48 PDT 2006



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.473 -> 1.474
---
Log message:

Fix Transforms/InstCombine/2006-05-04-DemandedBitCrash.ll


---
Diffs of the changes:  (+4 -0)

 InstructionCombining.cpp |    4 ++++
 1 files changed, 4 insertions(+)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.473 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.474
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.473	Fri Apr 28 17:21:41 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Thu May  4 12:33:35 2006
@@ -456,6 +456,8 @@
   Instruction *I = dyn_cast<Instruction>(V);
   if (!I) return;
 
+  Mask &= V->getType()->getIntegralTypeMask();
+  
   switch (I->getOpcode()) {
   case Instruction::And:
     // If either the LHS or the RHS are Zero, the result is zero.
@@ -713,6 +715,8 @@
   Instruction *I = dyn_cast<Instruction>(V);
   if (!I) return false;        // Only analyze instructions.
 
+  DemandedMask &= V->getType()->getIntegralTypeMask();
+  
   uint64_t KnownZero2, KnownOne2;
   switch (I->getOpcode()) {
   default: break;






More information about the llvm-commits mailing list