summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-21 18:22:19 +0000
committerChris Lattner <sabre@nondot.org>2005-12-21 18:22:19 +0000
commitdca56cbd9a257e89c4981a54aa8c54287002850b (patch)
treeabb5b3c7ff761beb707351b990c3039f8cda077c /llvm/lib/VMCore/Verifier.cpp
parentac12f684240b5f868cbbeb0e82ae9c9a9b052ef1 (diff)
downloadbcm5719-llvm-dca56cbd9a257e89c4981a54aa8c54287002850b.tar.gz
bcm5719-llvm-dca56cbd9a257e89c4981a54aa8c54287002850b.zip
Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand. llvm-svn: 24906
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
-rw-r--r--llvm/lib/VMCore/Verifier.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index 39800b11bb8..8b371f95b4d 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/lib/VMCore/Verifier.cpp
@@ -498,7 +498,9 @@ void Verifier::visitBinaryOperator(BinaryOperator &B) {
// 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!",
OpenPOWER on IntegriCloud