[PATCH] D79711: [ARM][BFloat] Add poly64_t on AArch32.
Ties Stuij via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 18 04:47:31 PDT 2020
stuij updated this revision to Diff 264586.
stuij added a comment.
adhere to attribution conventions
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79711/new/
https://reviews.llvm.org/D79711
Files:
clang/include/clang/Basic/TargetBuiltins.h
clang/lib/AST/ItaniumMangle.cpp
clang/lib/Sema/SemaType.cpp
clang/utils/TableGen/NeonEmitter.cpp
Index: clang/utils/TableGen/NeonEmitter.cpp
===================================================================
--- clang/utils/TableGen/NeonEmitter.cpp
+++ clang/utils/TableGen/NeonEmitter.cpp
@@ -2235,6 +2235,7 @@
OS << "#else\n";
OS << "typedef int8_t poly8_t;\n";
OS << "typedef int16_t poly16_t;\n";
+ OS << "typedef int64_t poly64_t;\n";
OS << "#endif\n";
// Emit Neon vector typedefs.
@@ -2247,7 +2248,7 @@
for (auto &TS : TDTypeVec) {
bool IsA64 = false;
Type T(TS, ".");
- if (T.isDouble() || (T.isPoly() && T.getElementSizeInBits() == 64))
+ if (T.isDouble())
IsA64 = true;
if (InIfdef && !IsA64) {
@@ -2280,7 +2281,7 @@
for (auto &TS : TDTypeVec) {
bool IsA64 = false;
Type T(TS, ".");
- if (T.isDouble() || (T.isPoly() && T.getElementSizeInBits() == 64))
+ if (T.isDouble())
IsA64 = true;
if (InIfdef && !IsA64) {
Index: clang/lib/Sema/SemaType.cpp
===================================================================
--- clang/lib/Sema/SemaType.cpp
+++ clang/lib/Sema/SemaType.cpp
@@ -7649,15 +7649,16 @@
Triple.getArch() == llvm::Triple::aarch64_be;
if (VecKind == VectorType::NeonPolyVector) {
if (IsPolyUnsigned) {
- // AArch64 polynomial vectors are unsigned and support poly64.
+ // AArch64 polynomial vectors are unsigned.
return BTy->getKind() == BuiltinType::UChar ||
BTy->getKind() == BuiltinType::UShort ||
BTy->getKind() == BuiltinType::ULong ||
BTy->getKind() == BuiltinType::ULongLong;
} else {
- // AArch32 polynomial vector are signed.
+ // AArch32 polynomial vectors are signed.
return BTy->getKind() == BuiltinType::SChar ||
- BTy->getKind() == BuiltinType::Short;
+ BTy->getKind() == BuiltinType::Short ||
+ BTy->getKind() == BuiltinType::LongLong;
}
}
Index: clang/lib/AST/ItaniumMangle.cpp
===================================================================
--- clang/lib/AST/ItaniumMangle.cpp
+++ clang/lib/AST/ItaniumMangle.cpp
@@ -3167,6 +3167,7 @@
case BuiltinType::UShort:
EltName = "poly16_t";
break;
+ case BuiltinType::LongLong:
case BuiltinType::ULongLong:
EltName = "poly64_t";
break;
Index: clang/include/clang/Basic/TargetBuiltins.h
===================================================================
--- clang/include/clang/Basic/TargetBuiltins.h
+++ clang/include/clang/Basic/TargetBuiltins.h
@@ -157,7 +157,7 @@
EltType getEltType() const { return (EltType)(Flags & EltTypeMask); }
bool isPoly() const {
EltType ET = getEltType();
- return ET == Poly8 || ET == Poly16;
+ return ET == Poly8 || ET == Poly16 || ET == Poly64;
}
bool isUnsigned() const { return (Flags & UnsignedFlag) != 0; }
bool isQuad() const { return (Flags & QuadFlag) != 0; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79711.264586.patch
Type: text/x-patch
Size: 2933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200518/28654be0/attachment-0001.bin>
More information about the cfe-commits
mailing list