1 ! This test checks lowering of OpenMP ordered directive with threads Clause.
2 ! Without clause in ordered direcitve, it behaves as if threads clause is
5 !RUN: %flang_fc1 -emit-fir -fopenmp %s -o - | FileCheck %s --check-prefix=FIRDialect
6 !RUN: %flang_fc1 -emit-fir -fopenmp %s -o - | fir-opt --fir-to-llvm-ir | FileCheck %s --check-prefix=LLVMIRDialect
7 !RUN: %flang_fc1 -emit-fir -fopenmp %s -o - | fir-opt --fir-to-llvm-ir | tco | FileCheck %s --check-prefix=LLVMIR
13 !FIRDialect: omp.ordered_region {
14 !LLVMIRDialect: omp.ordered_region {
15 !LLVMIR: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB0:[0-9]+]])
16 !LLVMIR-NEXT: call void @__kmpc_ordered(ptr @[[GLOB0]], i32 [[TMP0]])
19 !FIRDialect: omp.terminator
21 !LLVMIRDialect: omp.terminator
22 !LLVMIRDialect-NEXT: }
23 !LLVMIR: call void @__kmpc_end_ordered(ptr @[[GLOB0]], i32 [[TMP0]])
26 !FIRDialect: omp.ordered_region {
27 !LLVMIRDialect: omp.ordered_region {
28 !LLVMIR: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
29 !LLVMIR-NEXT: call void @__kmpc_ordered(ptr @[[GLOB1]], i32 [[TMP1]])
32 !FIRDialect: omp.terminator
34 !LLVMIRDialect: omp.terminator
35 !LLVMIRDialect-NEXT: }
36 !LLVMIR: call void @__kmpc_end_ordered(ptr @[[GLOB1]], i32 [[TMP1]])
37 !LLVMIR-NEXT: ret void