Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsic
arguments that are vectors of any size and element type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78631 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index 94d381d..79874b1 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -203,7 +203,7 @@
<< "(dyn_cast<VectorType>(Tys[" << Number << "]))";
else
OS << "Tys[" << Number << "]";
- } else if (VT == EVT::iAny || VT == EVT::fAny) {
+ } else if (VT == EVT::iAny || VT == EVT::fAny || VT == EVT::vAny) {
// 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
@@ -329,7 +329,7 @@
EVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
OS << getEnumName(VT);
- if (VT == EVT::iAny || VT == EVT::fAny || VT == EVT::iPTRAny)
+ if (EVT(VT).isOverloaded())
OverloadedTypeIndices.push_back(j);
if (VT == EVT::isVoid && j != 0 && j != je - 1)
@@ -357,7 +357,7 @@
EVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
OS << getEnumName(VT);
- if (VT == EVT::iAny || VT == EVT::fAny || VT == EVT::iPTRAny)
+ if (EVT(VT).isOverloaded())
OverloadedTypeIndices.push_back(j + RetTys.size());
if (VT == EVT::isVoid && j != 0 && j != je - 1)