diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-04 05:22:18 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-04 05:22:18 +0000 |
commit | affaf07bf829a0eff8addc3031a6c5e4984be3e8 (patch) | |
tree | 5914932f4ea7ebf7c39aa96defd3ff1bc86614d7 /lib/VMCore/Verifier.cpp | |
parent | 350f8aa72dd8640a455e2546ca7ebab67d457863 (diff) |
Do not allow packed types for icmp and fcmp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index d08166da21..719c6f2f5f 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -739,9 +739,7 @@ void Verifier::visitICmpInst(ICmpInst& IC) { Assert1(Op0Ty == Op1Ty, "Both operands to ICmp instruction are not of the same type!", &IC); // Check that the operands are the right type - Assert1(Op0Ty->isIntegral() || Op0Ty->getTypeID() == Type::PointerTyID || - (isa<PackedType>(Op0Ty) && - cast<PackedType>(Op0Ty)->getElementType()->isIntegral()), + Assert1(Op0Ty->isIntegral() || Op0Ty->getTypeID() == Type::PointerTyID, "Invalid operand types for ICmp instruction", &IC); visitInstruction(IC); } @@ -753,8 +751,7 @@ void Verifier::visitFCmpInst(FCmpInst& FC) { Assert1(Op0Ty == Op1Ty, "Both operands to FCmp instruction are not of the same type!", &FC); // Check that the operands are the right type - Assert1(Op0Ty->isFloatingPoint() || (isa<PackedType>(Op0Ty) && - cast<PackedType>(Op0Ty)->getElementType()->isFloatingPoint()), + Assert1(Op0Ty->isFloatingPoint(), "Invalid operand types for FCmp instruction", &FC); visitInstruction(FC); } |