| ! Fails until we update the pass to use the `fir.do_concurrent` op. |
| ! Tests that if `do concurrent` is not perfectly nested in its parent loop, that |
| ! we skip converting the not-perfectly nested `do concurrent` loop. |
| ! RUN: %flang_fc1 -emit-hlfir -fopenmp -fdo-concurrent-to-openmp=host %s -o - \ |
| integer, parameter :: n = 10 |
| integer, parameter :: m = 20 |
| integer, parameter :: l = 30 |
| do concurrent(j=1:m, k=1:l) |
| ! CHECK: %[[ORIG_K_ALLOC:.*]] = fir.alloca i32 {bindc_name = "k"} |
| ! CHECK: %[[ORIG_K_DECL:.*]]:2 = hlfir.declare %[[ORIG_K_ALLOC]] |
| ! CHECK: %[[ORIG_J_ALLOC:.*]] = fir.alloca i32 {bindc_name = "j"} |
| ! CHECK: %[[ORIG_J_DECL:.*]]:2 = hlfir.declare %[[ORIG_J_ALLOC]] |
| ! CHECK: omp.loop_nest ({{[^[:space:]]+}}) {{.*}} { |
| ! CHECK: fir.do_loop %[[J_IV:.*]] = {{.*}} { |
| ! CHECK: %[[J_IV_CONV:.*]] = fir.convert %[[J_IV]] : (index) -> i32 |
| ! CHECK: fir.store %[[J_IV_CONV]] to %[[ORIG_J_DECL]]#0 |
| ! CHECK: fir.do_loop %[[K_IV:.*]] = {{.*}} { |
| ! CHECK: %[[K_IV_CONV:.*]] = fir.convert %[[K_IV]] : (index) -> i32 |
| ! CHECK: fir.store %[[K_IV_CONV]] to %[[ORIG_K_DECL]]#0 |