27 lines · plain
1// RUN: fir-opt --lower-workshare --allow-unregistered-dialect %s 2>&1 | FileCheck %s2 3// CHECK: warning: omp workshare with unstructured control flow is currently unsupported and will be serialized.4 5// CHECK: omp.parallel6// CHECK-NEXT: omp.single7 8// TODO Check that the definition of %r dominates its use post-transform9func.func @wsfunc() {10 %a = fir.alloca i3211 omp.parallel {12 omp.workshare {13 ^bb1:14 %c1 = arith.constant 1 : i3215 cf.br ^bb3(%c1: i32)16 ^bb2:17 "test.test2"(%r) : (i32) -> ()18 omp.terminator19 ^bb3(%arg1: i32):20 %r = "test.test2"(%arg1) : (i32) -> i3221 cf.br ^bb222 }23 omp.terminator24 }25 return26}27