diff options
Diffstat (limited to 'clang/test/OpenMP/for_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/for_codegen.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/OpenMP/for_codegen.cpp b/clang/test/OpenMP/for_codegen.cpp index 39fd63fea76..1d24403a09f 100644 --- a/clang/test/OpenMP/for_codegen.cpp +++ b/clang/test/OpenMP/for_codegen.cpp @@ -492,4 +492,25 @@ void loop_with_stmt_expr() { // CHECK: call void @__kmpc_for_static_init_4( // CHECK: call void @__kmpc_for_static_fini( + +// CHECK-LABEL: fint +// CHECK: call {{.*}}i32 {{.*}}ftemplate +// CHECK: ret i32 + +// CHECK: load i16, i16* +// CHECK: store i16 % +// CHECK: call void {{.+}}@__kmpc_fork_call( +// CHECK: call void @__kmpc_for_static_init_4( +template <typename T> +T ftemplate() { + short aa = 0; + +#pragma omp parallel for schedule(static, aa) + for (int i = 0; i < 100; i++) { + } + return T(); +} + +int fint(void) { return ftemplate<int>(); } + #endif // HEADER |