23 lines · plain
1// RUN: fir-opt --lower-workshare --allow-unregistered-dialect %s | FileCheck %s2 3// Checks that the nested loop_wrapper gets parallelized4func.func @wsfunc(%cond : i1) {5 omp.workshare {6 %c1 = arith.constant 1 : index7 %c42 = arith.constant 42 : index8 fir.if %cond {9 omp.workshare.loop_wrapper {10 omp.loop_nest (%arg1) : index = (%c1) to (%c42) inclusive step (%c1) {11 "test.test1"() : () -> ()12 omp.yield13 }14 }15 }16 omp.terminator17 }18 return19}20 21// CHECK: fir.if22// CHECK: omp.wsloop nowait23