]> granicus.if.org Git - clang/commitdiff
[AArch64 ACLE] Allow to define poly64_t as 'unsigned long long' on LLP64 system.
authorKevin Qin <Kevin.Qin@arm.com>
Thu, 14 May 2015 08:18:05 +0000 (08:18 +0000)
committerKevin Qin <Kevin.Qin@arm.com>
Thu, 14 May 2015 08:18:05 +0000 (08:18 +0000)
This fixes PR23414 as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237348 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ItaniumMangle.cpp
lib/Sema/SemaChecking.cpp
test/CodeGenCXX/aarch64-neon.cpp

index 6e55655d85bba9678c445cb6b6446d5c1662fa49..7acaf098bcbc6a46bdd5a1424c166d11259ec9c6 100644 (file)
@@ -2311,6 +2311,7 @@ void CXXNameMangler::mangleAArch64NeonVectorType(const VectorType *T) {
       EltName = "Poly16";
       break;
     case BuiltinType::ULong:
+    case BuiltinType::ULongLong:
       EltName = "Poly64";
       break;
     default:
index 48c276eb09b9e5b7d0fddd9ca44170c53912d71c..a64932b1c7176a813eee54ee116120edad4f3792 100644 (file)
@@ -623,7 +623,10 @@ static QualType getNeonEltType(NeonTypeFlags Flags, ASTContext &Context,
   case NeonTypeFlags::Poly16:
     return IsPolyUnsigned ? Context.UnsignedShortTy : Context.ShortTy;
   case NeonTypeFlags::Poly64:
-    return Context.UnsignedLongTy;
+    if (IsInt64Long)
+      return Context.UnsignedLongTy;
+    else
+      return Context.UnsignedLongLongTy;
   case NeonTypeFlags::Poly128:
     break;
   case NeonTypeFlags::Float16:
index d6f6b0e894fbf08c984b1bc40374497ec27e00f8..fc8642df257fbbeb9b4925bd10d0256451fd9ef6 100644 (file)
@@ -1,6 +1,8 @@
 // REQUIRES: aarch64-registered-target
 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
 // RUN:   -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-netbsd-gnu -target-feature +neon \
+// RUN:   -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
 
 // Test whether arm_neon.h works as expected in C++.