diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-12 09:35:56 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-12 09:35:56 +0000 |
commit | d93d376ba9c9f2443f3bdd61e43e7b09b762ad24 (patch) | |
tree | 483e9beb248cea3f008785cf153b4987b5ae3fc5 /clang/test/OpenMP/declare_simd_ast_print.c | |
parent | 65f86cd8b09b15e6ba531309325750d1a3f4af7c (diff) | |
download | bcm5719-llvm-d93d376ba9c9f2443f3bdd61e43e7b09b762ad24.tar.gz bcm5719-llvm-d93d376ba9c9f2443f3bdd61e43e7b09b762ad24.zip |
[OPENMP 4.0] Support for 'aligned' clause in 'declare simd' directive.
The aligned clause declares that the object to which each list item points is aligned to the number of bytes expressed in the optional parameter of the aligned clause.
'aligned' '(' <argument-list> [ ':' <alignment> ] ')'
The optional parameter of the aligned clause, alignment, must be a constant positive integer expression. If no optional parameter is specified, implementation-defined default alignments for SIMD instructions on the target platforms are assumed.
The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses.
llvm-svn: 266052
Diffstat (limited to 'clang/test/OpenMP/declare_simd_ast_print.c')
-rw-r--r-- | clang/test/OpenMP/declare_simd_ast_print.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/OpenMP/declare_simd_ast_print.c b/clang/test/OpenMP/declare_simd_ast_print.c index fe6bffcf89a..5cb24084e53 100644 --- a/clang/test/OpenMP/declare_simd_ast_print.c +++ b/clang/test/OpenMP/declare_simd_ast_print.c @@ -6,16 +6,16 @@ #ifndef HEADER #define HEADER -#pragma omp declare simd -#pragma omp declare simd simdlen(32) +#pragma omp declare simd aligned(b : 64) +#pragma omp declare simd simdlen(32) aligned(d, s1) #pragma omp declare simd inbranch, uniform(d) #pragma omp declare simd notinbranch simdlen(2), uniform(s1, s2) -void add_1(float *d, float *s1, float *s2) __attribute__((cold)); +void add_1(float *d, float *s1, float *s2, double b[]) __attribute__((cold)); // CHECK: #pragma omp declare simd notinbranch simdlen(2) uniform(s1, s2) // CHECK-NEXT: #pragma omp declare simd inbranch uniform(d) -// CHECK-NEXT: #pragma omp declare simd simdlen(32) -// CHECK-NEXT: #pragma omp declare simd -// CHECK-NEXT: void add_1(float *d, float *s1, float *s2) __attribute__((cold)) +// CHECK-NEXT: #pragma omp declare simd simdlen(32) aligned(d) aligned(s1) +// CHECK-NEXT: #pragma omp declare simd aligned(b: 64) +// CHECK-NEXT: void add_1(float *d, float *s1, float *s2, double b[]) __attribute__((cold)) #endif |