summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-06-13 00:55:26 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-06-13 00:55:26 +0000
commitcf9f8f1762a9e0ed5fabe7653238890475add7d3 (patch)
tree7d371cbac853df6e9ec15b8b3132ce149a5b3e4c /llvm/lib/VMCore/Verifier.cpp
parent9d740629a06cbdac929dbbab6d0b8a7c6ce32d34 (diff)
downloadbcm5719-llvm-cf9f8f1762a9e0ed5fabe7653238890475add7d3.tar.gz
bcm5719-llvm-cf9f8f1762a9e0ed5fabe7653238890475add7d3.zip
Make assertions more consistent with the rest of the intrinsic
function verification and make it a requirement that both arguments to llvm.isunordered are of the same type. llvm-svn: 14165
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
-rw-r--r--llvm/lib/VMCore/Verifier.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index d221de9e65a..b832bd11747 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/lib/VMCore/Verifier.cpp
@@ -689,20 +689,24 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
}
case Intrinsic::isnan:
- Assert1(FT->getNumParams() == 1 && FT->getParamType(0)->isFloatingPoint(),
- "Illegal prototype for llvm.isnan", IF);
+ Assert1(FT->getNumParams() == 1,
+ "Illegal # arguments for intrinsic function!", IF);
Assert1(FT->getReturnType() == Type::BoolTy,
- "Illegal prototype for llvm.isnan", IF);
+ "Return type is not bool!", IF);
+ Assert1(FT->getParamType(0)->isFloatingPoint(),
+ "Argument is not a floating point type!", IF);
NumArgs = 1;
break;
case Intrinsic::isunordered:
- Assert1(FT->getNumParams() == 2 &&
- FT->getParamType(0)->isFloatingPoint() &&
- FT->getParamType(1)->isFloatingPoint(),
- "Illegal prototype for llvm.isunordered", IF);
+ Assert1(FT->getNumParams() == 2,
+ "Illegal # arguments for intrinsic function!", IF);
Assert1(FT->getReturnType() == Type::BoolTy,
- "Illegal prototype for llvm.isunordered", IF);
+ "Return type is not bool!", IF);
+ Assert1(FT->getParamType(0) == FT->getParamType(1),
+ "Arguments must be of the same type!", IF);
+ Assert1(FT->getParamType(0)->isFloatingPoint(),
+ "Argument is not a floating point type!", IF);
NumArgs = 2;
break;
OpenPOWER on IntegriCloud