4
4
// RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DLAMBDA -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=LAMBDA %s
5
5
// RUN: %clang_cc1 -verify -fopenmp -x c++ -fblocks -DBLOCKS -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=BLOCKS %s
6
6
// RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=ARRAY %s
7
+ // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DLOOP -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=LOOP %s
7
8
8
9
// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s
9
10
// RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-apple-darwin10 -emit-pch -o %t %s
10
11
// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple x86_64-apple-darwin10 -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s
11
12
// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -DLAMBDA -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s
12
13
// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -fblocks -DBLOCKS -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s
13
14
// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s
15
+ // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -DLOOP -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=SIMD-ONLY0 %s
14
16
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
15
17
// expected-no-diagnostics
16
18
// It doesn't pass on win32.
17
19
// REQUIRES: shell
18
- #ifndef ARRAY
20
+ #if !defined( ARRAY) && !defined(LOOP)
19
21
#ifndef HEADER
20
22
#define HEADER
21
23
@@ -501,7 +503,7 @@ int main() {
501
503
// CHECK: ret i32
502
504
503
505
#endif
504
- #else
506
+ #elif defined(ARRAY)
505
507
// ARRAY-LABEL: array_func
506
508
struct St {
507
509
int a, b;
@@ -522,5 +524,16 @@ void array_func(int n, float a[n], St s[2]) {
522
524
for (int i = 0 ; i < 10 ; ++i)
523
525
;
524
526
}
527
+ #else
528
+
529
+ // LOOP-LABEL: loop
530
+ void loop () {
531
+ // LOOP: call i8* @__kmpc_omp_task_alloc(
532
+ // LOOP: call void @__kmpc_taskloop(
533
+ int i;
534
+ #pragma omp taskloop lastprivate(i)
535
+ for (i = 0 ; i < 10 ; ++i)
536
+ ;
537
+ }
525
538
#endif
526
539
0 commit comments