This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by kevin.qin on May 11 2015, 1:55 AM.

Details

Reviewers
jmolloy
Summary

Hi,

This patch allows to define poly64_t as 'unsigned long long' on LLP64 system, like netbsd. This patch fixes PR23414 as well. Please review.

Thanks,
Kevin

Diff Detail

Event Timeline

kevin.qin updated this revision to Diff 25448.May 11 2015, 1:55 AM
kevin.qin retitled this revision from to [AArch64 NEON]Allow to define poly64_t as 'unsigned long long' on LLP64 system..
kevin.qin updated this object.
kevin.qin edited the test plan for this revision. (Show Details)
kevin.qin added a subscriber: Unknown Object (MLST).

Ping...

2015-05-11 16:55 GMT+08:00 Kevin Qin <kevinqindev@gmail.com>:

Hi,

This patch allows to define poly64_t as 'unsigned long long' on LLP64
system, like netbsd. This patch fixes PR23414 as well. Please review.

Thanks,
Kevin

http://reviews.llvm.org/D9655

Files:

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

Index: lib/AST/ItaniumMangle.cpp

  • lib/AST/ItaniumMangle.cpp

+++ lib/AST/ItaniumMangle.cpp
@@ -2311,6 +2311,7 @@

  EltName = "Poly16";
  break;
case BuiltinType::ULong:

+ case BuiltinType::ULongLong:

  EltName = "Poly64";
  break;
default:

Index: lib/Sema/SemaChecking.cpp

  • lib/Sema/SemaChecking.cpp

+++ lib/Sema/SemaChecking.cpp
@@ -623,7 +623,10 @@

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: test/CodeGenCXX/aarch64-neon.cpp

  • test/CodeGenCXX/aarch64-neon.cpp

+++ test/CodeGenCXX/aarch64-neon.cpp
@@ -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++.

EMAIL PREFERENCES

http://reviews.llvm.org/settings/panel/emailpreferences/
jmolloy accepted this revision.May 14 2015, 12:59 AM
jmolloy added a reviewer: jmolloy.
jmolloy added a subscriber: jmolloy.

Hi Kevin,

This LGTM.

Cheers,

James

This revision is now accepted and ready to land.May 14 2015, 12:59 AM
jmolloy closed this revision.Jul 17 2015, 2:29 AM

[Phab spring clean] This got committed.