2016-03-30 18:43:55 +08:00
|
|
|
// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp -emit-pch -o %t %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
|
2017-12-30 02:07:07 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp-simd -emit-pch -o %t %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp-simd -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
|
2016-03-30 18:43:55 +08:00
|
|
|
// expected-no-diagnostics
|
|
|
|
|
|
|
|
#ifndef HEADER
|
|
|
|
#define HEADER
|
|
|
|
|
2016-04-12 17:35:56 +08:00
|
|
|
#pragma omp declare simd aligned(b : 64)
|
2016-04-12 19:02:11 +08:00
|
|
|
#pragma omp declare simd simdlen(32) aligned(d, b)
|
|
|
|
#pragma omp declare simd inbranch, uniform(d) linear(val(s1, s2) : 32)
|
|
|
|
#pragma omp declare simd notinbranch simdlen(2), uniform(s1, s2) linear(d: s1)
|
|
|
|
void add_1(float *d, int s1, float *s2, double b[]) __attribute__((cold));
|
2016-03-30 18:43:55 +08:00
|
|
|
|
2018-02-15 01:38:47 +08:00
|
|
|
// CHECK: #pragma omp declare simd notinbranch simdlen(2) uniform(s1, s2) linear(val(d): s1){{$}}
|
|
|
|
// CHECK-NEXT: #pragma omp declare simd inbranch uniform(d) linear(val(s1): 32) linear(val(s2): 32){{$}}
|
|
|
|
// CHECK-NEXT: #pragma omp declare simd simdlen(32) aligned(d) aligned(b){{$}}
|
|
|
|
// CHECK-NEXT: #pragma omp declare simd aligned(b: 64){{$}}
|
2016-04-12 19:02:11 +08:00
|
|
|
// CHECK-NEXT: void add_1(float *d, int s1, float *s2, double b[]) __attribute__((cold))
|
2016-03-30 18:43:55 +08:00
|
|
|
|
|
|
|
#endif
|