flang/test/Transforms/OpenMP/lower-workshare-no-single.mlir
raw| 1 | // RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s |
| 2 | |
| 3 | // Check that we do not emit an omp.single for the constant operation |
| 4 | |
| 5 | func.func @foo() { |
| 6 | omp.workshare { |
| 7 | %c1 = arith.constant 1 : index |
| 8 | omp.workshare.loop_wrapper { |
| 9 | omp.loop_nest (%arg1) : index = (%c1) to (%c1) inclusive step (%c1) { |
| 10 | "test.test0"() : () -> () |
| 11 | omp.yield |
| 12 | } |
| 13 | } |
| 14 | omp.terminator |
| 15 | } |
| 16 | return |
| 17 | } |
| 18 | |
| 19 | // CHECK-NOT: omp.single |