From 438f562e5698022e0fbf834a762da7ed693b4de0 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 4 Jan 2007 05:22:18 +0000 Subject: [PATCH] Do not allow packed types for icmp and fcmp instructions. llvm-svn: 32865 --- llvm/lib/VMCore/Verifier.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index d08166da2179..719c6f2f5f09 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/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(Op0Ty) && - cast(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(Op0Ty) && - cast(Op0Ty)->getElementType()->isFloatingPoint()), + Assert1(Op0Ty->isFloatingPoint(), "Invalid operand types for FCmp instruction", &FC); visitInstruction(FC); }