| 1 |
// RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s |
| 2 |
|
| 3 |
// Check that we correctly handle nowait |
| 4 |
|
| 5 |
// CHECK-LABEL: func.func @nonowait |
| 6 |
func.func @nonowait(%arg0: !fir.ref<!fir.array<42xi32>>) { |
| 7 |
// CHECK: omp.barrier |
| 8 |
omp.workshare { |
| 9 |
omp.terminator |
| 10 |
} |
| 11 |
return |
| 12 |
} |
| 13 |
|
| 14 |
// ----- |
| 15 |
|
| 16 |
// CHECK-LABEL: func.func @nowait |
| 17 |
func.func @nowait(%arg0: !fir.ref<!fir.array<42xi32>>) { |
| 18 |
// CHECK-NOT: omp.barrier |
| 19 |
omp.workshare nowait { |
| 20 |
omp.terminator |
| 21 |
} |
| 22 |
return |
| 23 |
} |