Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand.
llvm-svn: 24906
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index 39800b1..8b371f9 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/lib/VMCore/Verifier.cpp
@@ -498,7 +498,9 @@
// Check that logical operators are only used with integral operands.
if (B.getOpcode() == Instruction::And || B.getOpcode() == Instruction::Or ||
B.getOpcode() == Instruction::Xor) {
- Assert1(B.getType()->isIntegral(),
+ Assert1(B.getType()->isIntegral() ||
+ (isa<PackedType>(B.getType()) &&
+ cast<PackedType>(B.getType())->getElementType()->isIntegral()),
"Logical operators only work with integral types!", &B);
Assert1(B.getType() == B.getOperand(0)->getType(),
"Logical operators must have same type for operands and result!",