diff options
| author | Reid Kleckner <rnk@google.com> | 2018-06-04 21:39:20 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2018-06-04 21:39:20 +0000 |
| commit | 89fbd551450d22ef01a33d208870407c7eff208b (patch) | |
| tree | c023a11822186c0c13945b07a28fda68f3bc6cfb /clang/test/CodeGen | |
| parent | 36df9d8514f755598d435a7f3205648dc0239c1d (diff) | |
| download | bcm5719-llvm-89fbd551450d22ef01a33d208870407c7eff208b.tar.gz bcm5719-llvm-89fbd551450d22ef01a33d208870407c7eff208b.zip | |
Revert r333791 "Cap "voluntary" vector alignment at 16 for all Darwin platforms."
Adding __attribute__((aligned(32))) to __m256 breaks the implementation
of _mm256_loadu_ps on Windows. On Windows, alignment attributes have
higher precedence than packing attributes.
We also might want to carefully consider the consequences of changing
our vector typedefs, since many users copy them and invent their own
new, non-Intel specific vector type names.
llvm-svn: 333958
Diffstat (limited to 'clang/test/CodeGen')
| -rw-r--r-- | clang/test/CodeGen/arm-swiftcall.c | 4 | ||||
| -rw-r--r-- | clang/test/CodeGen/vector-alignment.c | 84 |
2 files changed, 26 insertions, 62 deletions
diff --git a/clang/test/CodeGen/arm-swiftcall.c b/clang/test/CodeGen/arm-swiftcall.c index 75229c40a11..53109a3f681 100644 --- a/clang/test/CodeGen/arm-swiftcall.c +++ b/clang/test/CodeGen/arm-swiftcall.c @@ -64,8 +64,8 @@ typedef double double2 __attribute__((ext_vector_type(2))); typedef double double4 __attribute__((ext_vector_type(4))); typedef int int3 __attribute__((ext_vector_type(3))); typedef int int4 __attribute__((ext_vector_type(4))); -typedef int int5 __attribute__((ext_vector_type(5))) __attribute__((aligned(32))); -typedef int int8 __attribute__((ext_vector_type(8))) __attribute__((aligned(32))); +typedef int int5 __attribute__((ext_vector_type(5))); +typedef int int8 __attribute__((ext_vector_type(8))); typedef char char16 __attribute__((ext_vector_type(16))); typedef short short8 __attribute__((ext_vector_type(8))); typedef long long long2 __attribute__((ext_vector_type(2))); diff --git a/clang/test/CodeGen/vector-alignment.c b/clang/test/CodeGen/vector-alignment.c index 425819b5a0a..d1fd771fb7d 100644 --- a/clang/test/CodeGen/vector-alignment.c +++ b/clang/test/CodeGen/vector-alignment.c @@ -1,68 +1,38 @@ // RUN: %clang_cc1 -w -triple x86_64-apple-darwin10 \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=DARWIN_SSE +// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE // RUN: %clang_cc1 -w -triple i386-apple-darwin10 \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=DARWIN_SSE +// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE // RUN: %clang_cc1 -w -triple x86_64-apple-darwin10 -target-feature +avx \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=DARWIN_AVX +// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX // RUN: %clang_cc1 -w -triple i386-apple-darwin10 -target-feature +avx \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=DARWIN_AVX +// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX // RUN: %clang_cc1 -w -triple x86_64-apple-darwin10 -target-feature +avx512f \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=DARWIN_AVX512 +// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX512 // RUN: %clang_cc1 -w -triple i386-apple-darwin10 -target-feature +avx512f \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=DARWIN_AVX512 -// RUN: %clang_cc1 -w -triple armv7-apple-ios10 \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=DARWIN_ARM32 -// RUN: %clang_cc1 -w -triple arm64-apple-ios10 \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=DARWIN_ARM64 - -// RUN: %clang_cc1 -w -triple x86_64-pc-linux \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC -// RUN: %clang_cc1 -w -triple i386-pc-linux \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC -// RUN: %clang_cc1 -w -triple x86_64-pc-linux -target-feature +avx \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC -// RUN: %clang_cc1 -w -triple i386-pc-linux -target-feature +avx \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC -// RUN: %clang_cc1 -w -triple x86_64-pc-linux -target-feature +avx512f \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC -// RUN: %clang_cc1 -w -triple i386-pc-linux -target-feature +avx512f \ -// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC - +// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX512 // rdar://11759609 // At or below target max alignment with no aligned attribute should align based // on the size of vector. double __attribute__((vector_size(16))) v1; -// DARWIN_SSE: @v1 {{.*}}, align 16 -// DARWIN_AVX: @v1 {{.*}}, align 16 -// DARWIN_AVX512: @v1 {{.*}}, align 16 -// DARWIN_ARM32: @v1 {{.*}}, align 16 -// DARWIN_ARM64: @v1 {{.*}}, align 16 -// GENERIC: @v1 {{.*}}, align 16 +// SSE: @v1 {{.*}}, align 16 +// AVX: @v1 {{.*}}, align 16 +// AVX512: @v1 {{.*}}, align 16 double __attribute__((vector_size(32))) v2; -// DARWIN_SSE: @v2 {{.*}}, align 16 -// DARWIN_AVX: @v2 {{.*}}, align 16 -// DARWIN_AVX512: @v2 {{.*}}, align 16 -// DARWIN_ARM32: @v2 {{.*}}, align 16 -// DARWIN_ARM64: @v2 {{.*}}, align 16 -// GENERIC: @v2 {{.*}}, align 32 +// SSE: @v2 {{.*}}, align 16 +// AVX: @v2 {{.*}}, align 32 +// AVX512: @v2 {{.*}}, align 32 // Alignment above target max alignment with no aligned attribute should align // based on the target max. double __attribute__((vector_size(64))) v3; -// DARWIN_SSE: @v3 {{.*}}, align 16 -// DARWIN_AVX: @v3 {{.*}}, align 16 -// DARWIN_AVX512: @v3 {{.*}}, align 16 -// DARWIN_ARM32: @v3 {{.*}}, align 16 -// DARWIN_ARM64: @v3 {{.*}}, align 16 -// GENERIC: @v3 {{.*}}, align 64 +// SSE: @v3 {{.*}}, align 16 +// AVX: @v3 {{.*}}, align 32 +// AVX512: @v3 {{.*}}, align 64 double __attribute__((vector_size(1024))) v4; -// DARWIN_SSE: @v4 {{.*}}, align 16 -// DARWIN_AVX: @v4 {{.*}}, align 16 -// DARWIN_AVX512: @v4 {{.*}}, align 16 -// DARWIN_ARM32: @v4 {{.*}}, align 16 -// DARWIN_ARM64: @v4 {{.*}}, align 16 -// GENERIC: @v4 {{.*}}, align 1024 +// SSE: @v4 {{.*}}, align 16 +// AVX: @v4 {{.*}}, align 32 +// AVX512: @v4 {{.*}}, align 64 // Aliged attribute should always override. double __attribute__((vector_size(16), aligned(16))) v5; @@ -76,19 +46,13 @@ double __attribute__((vector_size(32), aligned(64))) v8; // Check non-power of 2 widths. double __attribute__((vector_size(24))) v9; -// DARWIN_SSE: @v9 {{.*}}, align 16 -// DARWIN_AVX: @v9 {{.*}}, align 16 -// DARWIN_AVX512: @v9 {{.*}}, align 16 -// DARWIN_ARM32: @v9 {{.*}}, align 16 -// DARWIN_ARM64: @v9 {{.*}}, align 16 -// GENERIC: @v9 {{.*}}, align 32 +// SSE: @v9 {{.*}}, align 16 +// AVX: @v9 {{.*}}, align 32 +// AVX512: @v9 {{.*}}, align 32 double __attribute__((vector_size(40))) v10; -// DARWIN_SSE: @v10 {{.*}}, align 16 -// DARWIN_AVX: @v10 {{.*}}, align 16 -// DARWIN_AVX512: @v10 {{.*}}, align 16 -// DARWIN_ARM32: @v10 {{.*}}, align 16 -// DARWIN_ARM64: @v10 {{.*}}, align 16 -// GENERIC: @v10 {{.*}}, align 64 +// SSE: @v10 {{.*}}, align 16 +// AVX: @v10 {{.*}}, align 32 +// AVX512: @v10 {{.*}}, align 64 // Check non-power of 2 widths with aligned attribute. double __attribute__((vector_size(24), aligned(64))) v11; |

