diff options
author | Javed Absar <javed.absar@arm.com> | 2017-06-07 10:02:02 +0000 |
---|---|---|
committer | Javed Absar <javed.absar@arm.com> | 2017-06-07 10:02:02 +0000 |
commit | 1f8a87749fa3809736ee58d9904112aeed0e4702 (patch) | |
tree | 86bc6be2ba5efb249c9b3bbb5e3045e87093e6c8 /lib/Basic/Targets.cpp | |
parent | 98df4e7a69e18bc0303bff66a7ef7b2e5a04af1e (diff) |
[ARM] Fix Neon vector type alignment to 64-bit
This is restricted version of patch - https://reviews.llvm.org/D33205
that I reverted as it was leading to ABI breaks on darwin etc.
This patch restricts the fix to AAPCS (Android remains 128-bit).
Reviewed by: Renato Golin, Stephen Hines
Differential Revision: https://reviews.llvm.org/D33786
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index f939bfb339..a304a78354 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -5385,6 +5385,10 @@ public: // ARM has atomics up to 8 bytes setAtomic(); + // Maximum alignment for ARM NEON data types should be 64-bits (AAPCS) + if (IsAAPCS && (Triple.getEnvironment() != llvm::Triple::Android)) + MaxVectorAlign = 64; + // Do force alignment of members that follow zero length bitfields. If // the alignment of the zero-length bitfield is greater than the member // that follows it, `bar', `bar' will be aligned as the type of the |