aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-08-16 21:57:19 +0000
committerDan Gohman <gohman@apple.com>2007-08-16 21:57:19 +0000
commit0fee3ff93ea0bf1ce6466fec1d8496514d76e289 (patch)
tree37f28a57b0b04823f5a4764a67421959da6a25ca /lib/VMCore
parent4d13de4e3bfc5121207efd01e1b31caa6bb4e40b (diff)
downloadexternal_llvm-0fee3ff93ea0bf1ce6466fec1d8496514d76e289.zip
external_llvm-0fee3ff93ea0bf1ce6466fec1d8496514d76e289.tar.gz
external_llvm-0fee3ff93ea0bf1ce6466fec1d8496514d76e289.tar.bz2
Add MVT::fAny for overloading intrinsics on floating-point types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41128 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Verifier.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index c01f0fe..0c4ca64 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -1157,6 +1157,20 @@ void Verifier::VerifyIntrinsicPrototype(Intrinsic::ID ID,
CheckFailed("Intrinsic requires even byte width argument", F);
break;
}
+ } else if (VT == MVT::fAny) {
+ Suffix += ".";
+ if (EltTy != Ty)
+ Suffix += "v" + utostr(NumElts);
+ Suffix += MVT::getValueTypeString(MVT::getValueType(EltTy));
+ if (!EltTy->isFloatingPoint()) {
+ if (ArgNo == 0)
+ CheckFailed("Intrinsic result type is not "
+ "a floating-point type.", F);
+ else
+ CheckFailed("Intrinsic parameter #" + utostr(ArgNo-1) + " is not "
+ "a floating-point type.", F);
+ break;
+ }
} else if (VT == MVT::iPTR) {
if (!isa<PointerType>(Ty)) {
CheckFailed("Intrinsic parameter #" + utostr(ArgNo-1) + " is not a "