[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sat Jun 12 20:01:01 PDT 2004
Changes in directory llvm/lib/VMCore:
Verifier.cpp updated: 1.109 -> 1.110
---
Log message:
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.
---
Diffs of the changes: (+12 -8)
Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.109 llvm/lib/VMCore/Verifier.cpp:1.110
--- llvm/lib/VMCore/Verifier.cpp:1.109 Sat Jun 12 14:18:54 2004
+++ llvm/lib/VMCore/Verifier.cpp Sat Jun 12 19:55:26 2004
@@ -689,20 +689,24 @@
}
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;
More information about the llvm-commits
mailing list