brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 6fb7c60 Raw
82 lines · c
1// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -fopenmp -fsyntax-only -verify %s2// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -fopenmp -fsyntax-only -verify=expected-cpp -x c++ %s3 4int compute(int);5 6void streaming_openmp_captured_region(int * out) __arm_streaming {7  // expected-error@+2 {{OpenMP captured regions are not yet supported in streaming functions}}8  // expected-cpp-error@+1 {{OpenMP captured regions are not yet supported in streaming functions}}9  #pragma omp parallel for num_threads(32)10  for (int ci = 0; ci < 8; ci++) {11    out[ci] = compute(ci);12  }13}14 15__arm_locally_streaming void locally_streaming_openmp_captured_region(int * out) {16  // expected-error@+2 {{OpenMP captured regions are not yet supported in streaming functions}}17  // expected-cpp-error@+1 {{OpenMP captured regions are not yet supported in streaming functions}}18  #pragma omp parallel for num_threads(32)19  for (int ci = 0; ci < 8; ci++) {20    out[ci] = compute(ci);21  }22}23 24void za_state_captured_region(int * out) __arm_inout("za") {25  // expected-error@+2 {{OpenMP captured regions are not yet supported in functions with ZA state}}26  // expected-cpp-error@+1 {{OpenMP captured regions are not yet supported in functions with ZA state}}27  #pragma omp parallel for num_threads(32)28  for (int ci = 0; ci < 8; ci++) {29    out[ci] = compute(ci);30  }31}32 33__arm_new("za") void new_za_state_captured_region(int * out) {34  // expected-error@+2 {{OpenMP captured regions are not yet supported in functions with ZA state}}35  // expected-cpp-error@+1 {{OpenMP captured regions are not yet supported in functions with ZA state}}36  #pragma omp parallel for num_threads(32)37  for (int ci = 0; ci < 8; ci++) {38    out[ci] = compute(ci);39  }40}41 42void zt0_state_openmp_captured_region(int * out) __arm_inout("zt0") {43  // expected-error@+2 {{OpenMP captured regions are not yet supported in functions with ZT0 state}}44  // expected-cpp-error@+1 {{OpenMP captured regions are not yet supported in functions with ZT0 state}}45  #pragma omp parallel for num_threads(32)46  for (int ci = 0; ci < 8; ci++) {47    out[ci] = compute(ci);48  }49}50 51__arm_new("zt0") void new_zt0_state_openmp_captured_region(int * out) {52  // expected-error@+2 {{OpenMP captured regions are not yet supported in functions with ZT0 state}}53  // expected-cpp-error@+1 {{OpenMP captured regions are not yet supported in functions with ZT0 state}}54  #pragma omp parallel for num_threads(32)55  for (int ci = 0; ci < 8; ci++) {56    out[ci] = compute(ci);57  }58}59 60/// OpenMP directives that don't create a captured region are okay:61 62void streaming_function_openmp(int * out) __arm_streaming __arm_inout("za", "zt0") {63  #pragma omp unroll full64  for (int ci = 0; ci < 8; ci++) {65    out[ci] = compute(ci);66  }67}68 69__arm_locally_streaming void locally_streaming_openmp(int * out) __arm_inout("za", "zt0") {70  #pragma omp unroll full71  for (int ci = 0; ci < 8; ci++) {72    out[ci] = compute(ci);73  }74}75 76__arm_new("za", "zt0") void arm_new_openmp(int * out) {77  #pragma omp unroll full78  for (int ci = 0; ci < 8; ci++) {79    out[ci] = compute(ci);80  }81}82