Alexey Bataev | 3e81246 | 2019-04-16 14:26:10 +0000 | [diff] [blame] | 1 | // REQUIRES: aarch64-registered-target |
Alexey Bataev | a0a2264 | 2019-04-16 13:56:21 +0000 | [diff] [blame] | 2 | // -fopemp and -fopenmp-simd behavior are expected to be the same. |
| 3 | |
| 4 | // RUN: %clang_cc1 -verify -triple aarch64-linux-gnu -target-feature +neon -fopenmp -x c++ -emit-llvm %s -o - -femit-all-decls -verify| FileCheck %s --check-prefix=ADVSIMD |
| 5 | // RUN: %clang_cc1 -verify -triple aarch64-linux-gnu -target-feature +sve -fopenmp -x c++ -emit-llvm %s -o - -femit-all-decls -verify| FileCheck %s --check-prefix=SVE |
| 6 | |
| 7 | // RUN: %clang_cc1 -verify -triple aarch64-linux-gnu -target-feature +neon -fopenmp-simd -x c++ -emit-llvm %s -o - -femit-all-decls -verify| FileCheck %s --check-prefix=ADVSIMD |
| 8 | // RUN: %clang_cc1 -verify -triple aarch64-linux-gnu -target-feature +sve -fopenmp-simd -x c++ -emit-llvm %s -o - -femit-all-decls -verify| FileCheck %s --check-prefix=SVE |
| 9 | |
| 10 | // expected-no-diagnostics |
| 11 | |
| 12 | #pragma omp declare simd |
| 13 | double f(double x); |
| 14 | |
| 15 | #pragma omp declare simd |
| 16 | float f(float x); |
| 17 | |
| 18 | void aaa(double *x, double *y, int N) { |
| 19 | for (int i = 0; i < N; ++i) { |
| 20 | x[i] = f(y[i]); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | void aaa(float *x, float *y, int N) { |
| 25 | for (int i = 0; i < N; ++i) { |
| 26 | x[i] = f(y[i]); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | // ADVSIMD: "_ZGVnN2v__Z1fd" |
| 31 | // ADVSIMD-NOT: _Z1fd |
| 32 | // ADVSIMD: "_ZGVnN4v__Z1ff" |
| 33 | // ADVSIMD-NOT: _Z1fF |
| 34 | |
| 35 | // SVE: "_ZGVsMxv__Z1fd" |
| 36 | // SVE-NOT: _Z1fd |
| 37 | // SVE: "_ZGVsMxv__Z1ff" |
| 38 | // SVE-NOT: _Z1ff |