aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDan Gohman <djg@cray.com>2007-08-16 21:57:19 +0000
committerDan Gohman <djg@cray.com>2007-08-16 21:57:19 +0000
commit0034418194a450020475ce9ca47638b31e921bf1 (patch)
tree37f28a57b0b04823f5a4764a67421959da6a25ca /utils
parent2bd46a53fee0245a29c2d7d025a5bd717f77d2a1 (diff)
downloadexternal_llvm-0034418194a450020475ce9ca47638b31e921bf1.zip
external_llvm-0034418194a450020475ce9ca47638b31e921bf1.tar.gz
external_llvm-0034418194a450020475ce9ca47638b31e921bf1.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