Debian Codegraph @

flang/test/Transforms/OpenMP/lower-workshare-todo-cfg-dom.mlir

raw
1 // RUN: fir-opt --lower-workshare --allow-unregistered-dialect %s 2>&1 | FileCheck %s
2
3 // CHECK: warning: omp workshare with unstructured control flow is currently unsupported and will be serialized.
4
5 // CHECK: omp.parallel
6 // CHECK-NEXT: omp.single
7
8 // TODO Check that the definition of %r dominates its use post-transform
9 func.func @wsfunc() {
10 %a = fir.alloca i32
11 omp.parallel {
12 omp.workshare {
13 ^bb1:
14 %c1 = arith.constant 1 : i32
15 cf.br ^bb3(%c1: i32)
16 ^bb2:
17 "test.test2"(%r) : (i32) -> ()
18 omp.terminator
19 ^bb3(%arg1: i32):
20 %r = "test.test2"(%arg1) : (i32) -> i32
21 cf.br ^bb2
22 }
23 omp.terminator
24 }
25 return
26 }