mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-10 06:25:01 +00:00
Do not allow packed types for icmp and fcmp instructions.
llvm-svn: 32865
This commit is contained in:
parent
9c23bd6133
commit
4b18100144
@ -739,9 +739,7 @@ void Verifier::visitICmpInst(ICmpInst& IC) {
|
|||||||
Assert1(Op0Ty == Op1Ty,
|
Assert1(Op0Ty == Op1Ty,
|
||||||
"Both operands to ICmp instruction are not of the same type!", &IC);
|
"Both operands to ICmp instruction are not of the same type!", &IC);
|
||||||
// Check that the operands are the right type
|
// Check that the operands are the right type
|
||||||
Assert1(Op0Ty->isIntegral() || Op0Ty->getTypeID() == Type::PointerTyID ||
|
Assert1(Op0Ty->isIntegral() || Op0Ty->getTypeID() == Type::PointerTyID,
|
||||||
(isa<PackedType>(Op0Ty) &&
|
|
||||||
cast<PackedType>(Op0Ty)->getElementType()->isIntegral()),
|
|
||||||
"Invalid operand types for ICmp instruction", &IC);
|
"Invalid operand types for ICmp instruction", &IC);
|
||||||
visitInstruction(IC);
|
visitInstruction(IC);
|
||||||
}
|
}
|
||||||
@ -753,8 +751,7 @@ void Verifier::visitFCmpInst(FCmpInst& FC) {
|
|||||||
Assert1(Op0Ty == Op1Ty,
|
Assert1(Op0Ty == Op1Ty,
|
||||||
"Both operands to FCmp instruction are not of the same type!", &FC);
|
"Both operands to FCmp instruction are not of the same type!", &FC);
|
||||||
// Check that the operands are the right type
|
// Check that the operands are the right type
|
||||||
Assert1(Op0Ty->isFloatingPoint() || (isa<PackedType>(Op0Ty) &&
|
Assert1(Op0Ty->isFloatingPoint(),
|
||||||
cast<PackedType>(Op0Ty)->getElementType()->isFloatingPoint()),
|
|
||||||
"Invalid operand types for FCmp instruction", &FC);
|
"Invalid operand types for FCmp instruction", &FC);
|
||||||
visitInstruction(FC);
|
visitInstruction(FC);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user