[AArch64 ACLE] Allow to define poly64_t as 'unsigned long long' on LLP64 system.

This fixes PR23414 as well.

llvm-svn: 237348
This commit is contained in:
Kevin Qin 2015-05-14 08:18:05 +00:00
parent 55deb26613
commit 78b8653a84
3 changed files with 7 additions and 1 deletions

View File

@ -2311,6 +2311,7 @@ void CXXNameMangler::mangleAArch64NeonVectorType(const VectorType *T) {
EltName = "Poly16";
break;
case BuiltinType::ULong:
case BuiltinType::ULongLong:
EltName = "Poly64";
break;
default:

View 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:

View 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++.