summaryrefslogtreecommitdiffstats
path: root/clang/utils
diff options
context:
space:
mode:
authorMark Murray <mark.murray@arm.com>2019-12-04 14:28:22 +0000
committerMark Murray <mark.murray@arm.com>2019-12-09 17:41:47 +0000
commit2eb61fa5d68567435c4d0f1dcc0620bd9956edca (patch)
tree53e5e2d4539ccce14b7853d6661bdacd8992ea08 /clang/utils
parentc78726fae0edf28e0556a03b7b44df3c4ec3c94e (diff)
downloadbcm5719-llvm-2eb61fa5d68567435c4d0f1dcc0620bd9956edca.tar.gz
bcm5719-llvm-2eb61fa5d68567435c4d0f1dcc0620bd9956edca.zip
[ARM][MVE][Intrinsics] Add VMULL[BT]Q_(INT|POLY) intrinsics.
Summary: Add VMULL[BT]Q_(INT|POLY) intrinsics and unit tests. Reviewers: simon_tatham, ostannard, dmgreen Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71066
Diffstat (limited to 'clang/utils')
-rw-r--r--clang/utils/TableGen/MveEmitter.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index 643d2d598ba..35a5e52bf4a 100644
--- a/clang/utils/TableGen/MveEmitter.cpp
+++ b/clang/utils/TableGen/MveEmitter.cpp
@@ -143,7 +143,7 @@ public:
virtual std::string llvmName() const {
PrintFatalError("no LLVM type name available for type " + cName());
}
- virtual std::string acleSuffix() const {
+ virtual std::string acleSuffix(std::string) const {
PrintFatalError("no ACLE suffix available for this type");
}
};
@@ -180,7 +180,7 @@ public:
std::string cName() const override { return "void"; }
static bool classof(const Type *T) { return T->typeKind() == TypeKind::Void; }
- std::string acleSuffix() const override { return ""; }
+ std::string acleSuffix(std::string) const override { return ""; }
};
class PointerType : public Type {
@@ -266,8 +266,9 @@ public:
}
return "Int" + utostr(Bits) + "Ty";
}
- std::string acleSuffix() const override {
- return "_" + toLetter(Kind) + utostr(Bits);
+ std::string acleSuffix(std::string overrideLetter) const override {
+ return "_" + (overrideLetter.size() ? overrideLetter : toLetter(Kind))
+ + utostr(Bits);
}
bool isInteger() const { return Kind != ScalarTypeKind::Float; }
bool requiresFloat() const override { return !isInteger(); }
@@ -1093,6 +1094,16 @@ const Type *MveEmitter::getType(DagInit *D, const Type *Param) {
PrintFatalError("Cannot find a type to satisfy CopyKind");
}
+ if (Op->getName() == "CTO_DoubleSize") {
+ const ScalarType *STKind = cast<ScalarType>(getType(D->getArg(0), Param));
+ for (const auto &kv : ScalarTypes) {
+ const ScalarType *RT = kv.second.get();
+ if (RT->kind() == STKind->kind() && RT->sizeInBits() == 2*STKind->sizeInBits())
+ return RT;
+ }
+ PrintFatalError("Cannot find a type to satisfy DoubleSize");
+ }
+
PrintFatalError("Bad operator in type dag expression");
}
@@ -1251,7 +1262,8 @@ ACLEIntrinsic::ACLEIntrinsic(MveEmitter &ME, Record *R, const Type *Param)
StringRef BaseName =
(R->isSubClassOf("NameOverride") ? R->getValueAsString("basename")
: R->getName());
- FullName = (Twine(BaseName) + Param->acleSuffix()).str();
+ StringRef overrideLetter = R->getValueAsString("overrideKindLetter");
+ FullName = (Twine(BaseName) + Param->acleSuffix(overrideLetter)).str();
// Derive the intrinsic's polymorphic name, by removing components from the
// full name as specified by its 'pnt' member ('polymorphic name type'),
OpenPOWER on IntegriCloud