[Clang] Make OpenMP offloading consistently use the bound architecture (#125135)
[llvm-project.git] / flang / test / Transforms / generic-loop-rewriting-todo.mlir
blobcbde981c4c49d31d27540eceb57b166b07cedc1f
1 // RUN: fir-opt --omp-generic-loop-conversion -verify-diagnostics %s
3 func.func @_QPparallel_loop() {
4   omp.parallel {
5     %c0 = arith.constant 0 : i32
6     %c10 = arith.constant 10 : i32
7     %c1 = arith.constant 1 : i32
8     // expected-error@below {{not yet implemented: Combined `parallel loop` directive}}
9     omp.loop {
10       omp.loop_nest (%arg3) : i32 = (%c0) to (%c10) inclusive step (%c1) {
11         omp.yield
12       }
13     }
14     omp.terminator
15   }
16   return
19 func.func @_QPloop_bind() {
20   omp.teams {
21     %c0 = arith.constant 0 : i32
22     %c10 = arith.constant 10 : i32
23     %c1 = arith.constant 1 : i32
24     // expected-error@below {{not yet implemented: Unhandled clause bind in omp.loop operation}}
25     omp.loop bind(thread) {
26       omp.loop_nest (%arg3) : i32 = (%c0) to (%c10) inclusive step (%c1) {
27         omp.yield
28       }
29     }
30     omp.terminator
31   }
32   return
35 omp.declare_reduction @add_reduction_i32 : i32 init {
36   ^bb0(%arg0: i32):
37     %c0_i32 = arith.constant 0 : i32
38     omp.yield(%c0_i32 : i32)
39   } combiner {
40   ^bb0(%arg0: i32, %arg1: i32):
41     %0 = arith.addi %arg0, %arg1 : i32
42     omp.yield(%0 : i32)
43   }
45 func.func @_QPloop_order() {
46   omp.teams {
47     %c0 = arith.constant 0 : i32
48     %c10 = arith.constant 10 : i32
49     %c1 = arith.constant 1 : i32
50     %sum = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFtest_orderEi"}
52     // expected-error@below {{not yet implemented: Unhandled clause reduction in omp.loop operation}}
53     omp.loop reduction(@add_reduction_i32 %sum -> %arg2 : !fir.ref<i32>) {
54       omp.loop_nest (%arg3) : i32 = (%c0) to (%c10) inclusive step (%c1) {
55         omp.yield
56       }
57     }
58     omp.terminator
59   }
60   return