brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 2cd6d39 Raw
39 lines · cpp
1// REQUIRES: aarch64-registered-target2// -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=ADVSIMD5// 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=SVE6 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=ADVSIMD8// 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=SVE9 10// expected-no-diagnostics11 12#pragma omp declare simd13double f(double x);14 15#pragma omp declare simd16float f(float x);17 18void aaa(double *x, double *y, int N) {19  for (int i = 0; i < N; ++i) {20    x[i] = f(y[i]);21  }22}23 24void 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: _Z1fd32// ADVSIMD: "_ZGVnN4v__Z1ff"33// ADVSIMD-NOT: _Z1fF34 35// SVE: "_ZGVsMxv__Z1fd"36// SVE-NOT: _Z1fd37// SVE: "_ZGVsMxv__Z1ff"38// SVE-NOT: _Z1ff39