Changes in directory llvm/lib/VMCore:
Constants.cpp updated: 1.141 -> 1.142 --- Log message: Fix an assertion to allow constant folding of packed values --- Diffs of the changes: (+4 -3) Constants.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.141 llvm/lib/VMCore/Constants.cpp:1.142 --- llvm/lib/VMCore/Constants.cpp:1.141 Thu Dec 22 15:46:37 2005 +++ llvm/lib/VMCore/Constants.cpp Tue Jan 3 19:01:04 2006 @@ -1277,14 +1277,15 @@ case Instruction::Mul: case Instruction::Div: case Instruction::Rem: assert(C1->getType() == C2->getType() && "Op types should be identical!"); - assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint()) && + assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint() || + isa<PackedType>(C1->getType())) && "Tried to create an arithmetic operation on a non-arithmetic type!"); break; case Instruction::And: case Instruction::Or: case Instruction::Xor: assert(C1->getType() == C2->getType() && "Op types should be identical!"); - assert(C1->getType()->isIntegral() && + assert((C1->getType()->isIntegral() || isa<PackedType>(C1->getType())) && "Tried to create a logical operation on a non-integral type!"); break; case Instruction::SetLT: case Instruction::SetGT: case Instruction::SetLE: @@ -1294,7 +1295,7 @@ case Instruction::Shl: case Instruction::Shr: assert(C2->getType() == Type::UByteTy && "Shift should be by ubyte!"); - assert(C1->getType()->isInteger() && + assert((C1->getType()->isInteger() || isa<PackedType>(C1->getType())) && "Tried to create a shift operation on a non-integer type!"); break; default: _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits