[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / OpenMP / declare_simd_aarch64.cpp
blob2cd6d3986fcc12ad92ab05aa001c3dfbbcbdd902
1 // REQUIRES: aarch64-registered-target
2 // -fopemp and -fopenmp-simd behavior are expected to be the same.
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
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
10 // expected-no-diagnostics
12 #pragma omp declare simd
13 double f(double x);
15 #pragma omp declare simd
16 float f(float x);
18 void aaa(double *x, double *y, int N) {
19 for (int i = 0; i < N; ++i) {
20 x[i] = f(y[i]);
24 void aaa(float *x, float *y, int N) {
25 for (int i = 0; i < N; ++i) {
26 x[i] = f(y[i]);
30 // ADVSIMD: "_ZGVnN2v__Z1fd"
31 // ADVSIMD-NOT: _Z1fd
32 // ADVSIMD: "_ZGVnN4v__Z1ff"
33 // ADVSIMD-NOT: _Z1fF
35 // SVE: "_ZGVsMxv__Z1fd"
36 // SVE-NOT: _Z1fd
37 // SVE: "_ZGVsMxv__Z1ff"
38 // SVE-NOT: _Z1ff