Skip to content

[MLIR][OpenMP] NFC: Update parallel workshare loop reduction tests #105835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions mlir/test/Dialect/OpenMP/ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -1019,10 +1019,10 @@ func.func @parallel_reduction_byref() {
func.func @parallel_wsloop_reduction(%lb : index, %ub : index, %step : index) {
%c1 = arith.constant 1 : i32
%0 = llvm.alloca %c1 x i32 : (i32) -> !llvm.ptr
// CHECK: omp.parallel reduction(@add_f32 %{{.*}} -> %{{.+}} : !llvm.ptr) {
omp.parallel reduction(@add_f32 %0 -> %prv : !llvm.ptr) {
// CHECK: omp.wsloop {
omp.wsloop {
// CHECK: omp.parallel {
omp.parallel {
// CHECK: omp.wsloop reduction(@add_f32 %{{.*}} -> %{{.+}} : !llvm.ptr) {
omp.wsloop reduction(@add_f32 %0 -> %prv : !llvm.ptr) {
// CHECK: omp.loop_nest (%{{.+}}) : index = (%{{.+}}) to (%{{.+}}) step (%{{.+}}) {
omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) {
%1 = arith.constant 2.0 : f32
Expand Down Expand Up @@ -1216,10 +1216,10 @@ func.func @parallel_reduction2() {
func.func @parallel_wsloop_reduction2(%lb : index, %ub : index, %step : index) {
%c1 = arith.constant 1 : i32
%0 = llvm.alloca %c1 x i32 : (i32) -> !llvm.ptr
// CHECK: omp.parallel reduction(@add2_f32 %{{.*}} -> %{{.+}} : !llvm.ptr) {
omp.parallel reduction(@add2_f32 %0 -> %prv : !llvm.ptr) {
// CHECK: omp.wsloop {
omp.wsloop {
// CHECK: omp.parallel {
omp.parallel {
// CHECK: omp.wsloop reduction(@add2_f32 %{{.*}} -> %{{.+}} : !llvm.ptr) {
omp.wsloop reduction(@add2_f32 %0 -> %prv : !llvm.ptr) {
// CHECK: omp.loop_nest (%{{.+}}) : index = (%{{.+}}) to (%{{.+}}) step (%{{.+}}) {
omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) {
%1 = arith.constant 2.0 : f32
Expand Down
4 changes: 2 additions & 2 deletions mlir/test/Target/LLVMIR/openmp-reduction.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ llvm.func @parallel_nested_workshare_reduction(%ub : i64) {
%lb = llvm.mlir.constant(1 : i64) : i64
%step = llvm.mlir.constant(1 : i64) : i64

omp.parallel reduction(@add_i32 %0 -> %prv : !llvm.ptr) {
omp.wsloop {
omp.parallel {
omp.wsloop reduction(@add_i32 %0 -> %prv : !llvm.ptr) {
omp.loop_nest (%iv) : i64 = (%lb) to (%ub) step (%step) {
%ival = llvm.trunc %iv : i64 to i32
%lprv = llvm.load %prv : !llvm.ptr -> i32
Expand Down
Loading