You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
195 lines
7.0 KiB
195 lines
7.0 KiB
// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm -fexceptions -fcxx-exceptions -o - %s | FileCheck %s
|
|
|
|
int main() {
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for simd
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for schedule(static)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for simd schedule(static)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for schedule(static, 2)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for simd schedule(static, 2)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(auto)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(auto)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(runtime)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(runtime)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(guided)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(guided)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(dynamic)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(dynamic)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for schedule(monotonic: static)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for simd schedule(monotonic: static)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for schedule(monotonic: static, 2)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_for_static_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_for_static_fini
|
|
#pragma omp for simd schedule(monotonic: static, 2)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(monotonic: auto)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(monotonic: auto)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(monotonic: runtime)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(monotonic: runtime)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(monotonic: guided)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(monotonic: guided)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(monotonic: dynamic)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(monotonic: dynamic)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(nonmonotonic: guided)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(nonmonotonic: guided)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for schedule(nonmonotonic: dynamic)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(nonmonotonic: dynamic)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for schedule(static) ordered
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for simd schedule(static) ordered
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for schedule(static, 2) ordered(1)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for simd schedule(static, 2) ordered
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for schedule(auto) ordered(1)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
#pragma omp for simd schedule(auto) ordered
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for schedule(runtime) ordered
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for simd schedule(runtime) ordered
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for schedule(guided) ordered(1)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for simd schedule(guided) ordered
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for schedule(dynamic) ordered(1)
|
|
for(int i = 0; i < 10; ++i);
|
|
// CHECK: @__kmpc_dispatch_init
|
|
// CHECK-NOT: !llvm.mem.parallel_loop_access
|
|
// CHECK: @__kmpc_dispatch_next
|
|
#pragma omp for simd schedule(dynamic)
|
|
for(int i = 0; i < 10; ++i);
|
|
return 0;
|
|
}
|