1 // REQUIRES: aarch64-registered-target
2 // -fopemp and -fopenmp-simd behavior are expected to be the same
4 // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +sve \
5 // RUN: -fopenmp -x c -emit-llvm %s -o - -femit-all-decls | FileCheck %s
7 // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +sve \
8 // RUN: -fopenmp-simd -x c -emit-llvm %s -o - -femit-all-decls | FileCheck %s
10 #pragma omp declare simd
11 #pragma omp declare simd notinbranch
12 #pragma omp declare simd simdlen(2)
13 #pragma omp declare simd simdlen(4)
14 #pragma omp declare simd simdlen(5) // not a multiple of 128-bits
15 #pragma omp declare simd simdlen(6)
16 #pragma omp declare simd simdlen(8)
17 #pragma omp declare simd simdlen(32)
18 #pragma omp declare simd simdlen(34) // requires more than 2048 bits
21 // CHECK-DAG: "_ZGVsM2v_foo" "_ZGVsM32v_foo" "_ZGVsM4v_foo" "_ZGVsM6v_foo" "_ZGVsM8v_foo" "_ZGVsMxv_foo"
23 // CHECK-NOT: _ZGVsM5v_foo
24 // CHECK-NOT: _ZGVsM34v_foo
27 void foo_loop(double *x
, float *y
, int N
) {
28 for (int i
= 0; i
< N
; ++i
) {
35 #pragma omp declare simd notinbranch
37 // CHECK-DAG: _ZGVsMxv_a01_fun