Skip to content

Commit 67d357f

Browse files
LeporacanthicusjeanPerier
authored andcommitted
[mlir]Fix broken OpenMP tests
There appears to be a mismerge, where the same tests were added twice. As a consequence of fixing some review comments, the output of `none` for modifiers is no longer happening, so some tests in ops.mlir needed fixing. These fixes should match the llvm/main once the full set goes in.
1 parent 215712d commit 67d357f

File tree

2 files changed

+3
-29
lines changed

2 files changed

+3
-29
lines changed

mlir/test/Dialect/OpenMP/ops.mlir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index,
196196
omp.yield
197197
}
198198

199-
// CHECK: omp.wsloop (%{{.*}}) : index = (%{{.*}}) to (%{{.*}}) step (%{{.*}}) linear(%{{.*}} = %{{.*}} : memref<i32>) schedule(static, none)
199+
// CHECK: omp.wsloop (%{{.*}}) : index = (%{{.*}}) to (%{{.*}}) step (%{{.*}}) linear(%{{.*}} = %{{.*}} : memref<i32>) schedule(static)
200200
omp.wsloop (%iv) : index = (%lb) to (%ub) step (%step) schedule(static, none) lastprivate(%data_var : memref<i32>) linear(%data_var = %linear_var : memref<i32>) {
201201
omp.yield
202202
}
203203

204-
// CHECK: omp.wsloop (%{{.*}}) : index = (%{{.*}}) to (%{{.*}}) step (%{{.*}}) private(%{{.*}} : memref<i32>) firstprivate(%{{.*}} : memref<i32>) lastprivate(%{{.*}} : memref<i32>) linear(%{{.*}} = %{{.*}} : memref<i32>) schedule(static = %{{.*}}, none) collapse(3) ordered(2)
204+
// CHECK: omp.wsloop (%{{.*}}) : index = (%{{.*}}) to (%{{.*}}) step (%{{.*}}) private(%{{.*}} : memref<i32>) firstprivate(%{{.*}} : memref<i32>) lastprivate(%{{.*}} : memref<i32>) linear(%{{.*}} = %{{.*}} : memref<i32>) schedule(static = %{{.*}}) collapse(3) ordered(2)
205205
omp.wsloop (%iv) : index = (%lb) to (%ub) step (%step) ordered(2) private(%data_var : memref<i32>)
206206
firstprivate(%data_var : memref<i32>) lastprivate(%data_var : memref<i32>) linear(%data_var = %linear_var : memref<i32>)
207-
schedule(static = %chunk_var, none) collapse(3) {
207+
schedule(static = %chunk_var) collapse(3) {
208208
omp.yield
209209
}
210210

mlir/test/Target/LLVMIR/openmp-llvm.mlir

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -521,32 +521,6 @@ llvm.func @omp_critical(%x : !llvm.ptr<i32>, %xval : i32) -> () {
521521

522522
// -----
523523

524-
llvm.func @test_omp_wsloop_dynamic_nonmonotonic(%lb : i64, %ub : i64, %step : i64) -> () {
525-
omp.wsloop (%iv) : i64 = (%lb) to (%ub) step (%step) schedule(dynamic, nonmonotonic) {
526-
// CHECK: call void @__kmpc_dispatch_init_8u(%struct.ident_t* @{{.*}}, i32 %{{.*}}, i32 1073741859
527-
// CHECK: %[[continue:.*]] = call i32 @__kmpc_dispatch_next_8u
528-
// CHECK: %[[cond:.*]] = icmp ne i32 %[[continue]], 0
529-
// CHECK br i1 %[[cond]], label %omp_loop.header{{.*}}, label %omp_loop.exit{{.*}}
530-
llvm.call @body(%iv) : (i64) -> ()
531-
omp.yield
532-
}
533-
llvm.return
534-
}
535-
536-
llvm.func @test_omp_wsloop_dynamic_monotonic(%lb : i64, %ub : i64, %step : i64) -> () {
537-
omp.wsloop (%iv) : i64 = (%lb) to (%ub) step (%step) schedule(dynamic, monotonic) {
538-
// CHECK: call void @__kmpc_dispatch_init_8u(%struct.ident_t* @{{.*}}, i32 %{{.*}}, i32 536870947
539-
// CHECK: %[[continue:.*]] = call i32 @__kmpc_dispatch_next_8u
540-
// CHECK: %[[cond:.*]] = icmp ne i32 %[[continue]], 0
541-
// CHECK br i1 %[[cond]], label %omp_loop.header{{.*}}, label %omp_loop.exit{{.*}}
542-
llvm.call @body(%iv) : (i64) -> ()
543-
omp.yield
544-
}
545-
llvm.return
546-
}
547-
548-
// -----
549-
550524
// Check that the loop bounds are emitted in the correct location in case of
551525
// collapse. This only checks the overall shape of the IR, detailed checking
552526
// is done by the OpenMPIRBuilder.

0 commit comments

Comments
 (0)