aboutsummaryrefslogtreecommitdiffstats
path: root/utils
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 /utils
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 'utils')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp4
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 78b850b..1fee306 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -44,6 +44,7 @@ std::string llvm::getName(MVT::ValueType T) {
case MVT::i64: return "MVT::i64";
case MVT::i128: return "MVT::i128";
case MVT::iAny: return "MVT::iAny";
+ case MVT::fAny: return "MVT::fAny";
case MVT::f32: return "MVT::f32";
case MVT::f64: return "MVT::f64";
case MVT::f80: return "MVT::f80";
@@ -78,6 +79,7 @@ std::string llvm::getEnumName(MVT::ValueType T) {
case MVT::i64: return "MVT::i64";
case MVT::i128: return "MVT::i128";
case MVT::iAny: return "MVT::iAny";
+ case MVT::fAny: return "MVT::fAny";
case MVT::f32: return "MVT::f32";
case MVT::f64: return "MVT::f64";
case MVT::f80: return "MVT::f80";
@@ -652,7 +654,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R, CodeGenTarget *CGT) {
Record *TyEl = TypeList->getElementAsRecord(i);
assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!");
MVT::ValueType VT = getValueType(TyEl->getValueAsDef("VT"));
- isOverloaded |= VT == MVT::iAny;
+ isOverloaded |= VT == MVT::iAny || VT == MVT::fAny;
ArgVTs.push_back(VT);
ArgTypeDefs.push_back(TyEl);
}
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index f5df933..c3db273 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -146,7 +146,7 @@ static void EmitTypeGenerate(std::ostream &OS, Record *ArgType,
unsigned Number = ArgType->getValueAsInt("Number");
assert(Number < ArgNo && "Invalid matching number!");
OS << "Tys[" << Number << "]";
- } else if (VT == MVT::iAny) {
+ } else if (VT == MVT::iAny || VT == MVT::fAny) {
// NOTE: The ArgNo variable here is not the absolute argument number, it is
// the index of the "arbitrary" type in the Tys array passed to the
// Intrinsic::getDeclaration function. Consequently, we only want to