• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Check that the CHECK lines are generated for clang-generated functions
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck --check-prefix=OMP %s
3 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck --check-prefix=NOOMP %s
4 
5 const int size = 1024 * 1024 * 32;
6 
7 double A[size];
8 
9 void foo(void);
10 
main()11 int main() {
12   int i = 0;
13 
14 #pragma omp parallel for
15   for (i = 0; i < size; ++i) {
16     A[i] = 0.0;
17   }
18 
19   foo();
20 
21   return 0;
22 }
23 
foo(void)24 void foo(void) {
25   int i = 0;
26 
27 #pragma omp parallel for
28   for (i = 0; i < size; ++i) {
29     A[i] = 1.0;
30   }
31 }
32