diff --git a/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp b/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp index 2369dcd32d5e5..709ac402cc702 100644 --- a/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp +++ b/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp @@ -195,20 +195,19 @@ void DataSharingProcessor::insertLastPrivateCompare(mlir::Operation *op) { // Update the original variable just before exiting the worksharing // loop. Conversion as follows: // - // omp.wsloop / omp.simd { omp.wsloop / omp.simd { - // omp.loop_nest { omp.loop_nest { - // ... ... - // store ===> store - // omp.yield %v = arith.addi %iv, %step - // } %cmp = %step < 0 ? %v < %ub : %v > %ub - // omp.terminator fir.if %cmp { - // } fir.store %v to %loopIV - // ^%lpv_update_blk: + // omp.wsloop / omp.simd { omp.wsloop / omp.simd { + // omp.loop_nest { omp.loop_nest { + // ... ... + // store ===> store + // omp.yield %v = arith.addi %iv, %step + // } %cmp = %step < 0 ? %v < %ub : %v > %ub + // } fir.if %cmp { + // fir.store %v to %loopIV + // ^%lpv_update_blk: + // } + // omp.yield // } - // omp.yield // } - // omp.terminator - // } // Only generate the compare once in presence of multiple LastPrivate // clauses. diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp index a89029b720e78..70d89f5e521a5 100644 --- a/flang/lib/Lower/OpenMP/OpenMP.cpp +++ b/flang/lib/Lower/OpenMP/OpenMP.cpp @@ -1094,9 +1094,6 @@ static OpTy genWrapperOp(lower::AbstractConverter &converter, // Create entry block with arguments. genEntryBlock(converter, args, op.getRegion()); - firOpBuilder.setInsertionPoint( - lower::genOpenMPTerminator(firOpBuilder, op, loc)); - return op; } diff --git a/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir b/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir index aa2f416063fce..335877e7c9a87 100644 --- a/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir +++ b/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir @@ -17,7 +17,6 @@ func.func @_QPsb1(%arg0: !fir.ref {fir.bindc_name = "n"}, %arg1: !fir.ref omp.yield } - omp.terminator } omp.terminator } @@ -43,7 +42,6 @@ func.func @_QPsb1(%arg0: !fir.ref {fir.bindc_name = "n"}, %arg1: !fir.ref> {fir.bindc_name = "arr"}) { fir.store %indx to %3 : !fir.ref omp.yield } - omp.terminator } omp.terminator } @@ -110,7 +107,6 @@ func.func @_QPsb(%arr: !fir.box> {fir.bindc_name = "arr"}) { // CHECK-NEXT: omp.loop_nest (%[[INDX:.*]]) : i32 = (%[[C1]]) to (%[[C50]]) inclusive step (%[[C1]]) { // CHECK: llvm.store %[[INDX]], %{{.*}} : i32, !llvm.ptr // CHECK: omp.yield -// CHECK: omp.terminator // CHECK: omp.terminator // CHECK: llvm.return @@ -200,7 +196,6 @@ func.func @_QPsimd1(%arg0: !fir.ref {fir.bindc_name = "n"}, %arg1: !fir.ref fir.store %3 to %6 : !fir.ref omp.yield } - omp.terminator } omp.terminator } @@ -226,7 +221,6 @@ func.func @_QPsimd1(%arg0: !fir.ref {fir.bindc_name = "n"}, %arg1: !fir.ref // CHECK: llvm.store %[[I1]], %[[ARR_I_REF]] : i32, !llvm.ptr // CHECK: omp.yield // CHECK: } -// CHECK: omp.terminator // CHECK: } // CHECK: omp.terminator // CHECK: } @@ -519,7 +513,6 @@ func.func @_QPsimd_with_nested_loop() { fir.store %7 to %3 : !fir.ref omp.yield } - omp.terminator } return } @@ -540,7 +533,6 @@ func.func @_QPsimd_with_nested_loop() { // CHECK: ^bb3: // CHECK: omp.yield // CHECK: } -// CHECK: omp.terminator // CHECK: } // CHECK: llvm.return // CHECK: } @@ -736,7 +728,6 @@ func.func @_QPsb() { // CHECK: %[[RES_EXT:.*]] = llvm.zext %[[RES]] : i1 to i32 // CHECK: llvm.store %[[RES_EXT]], %[[PRV]] : i32, !llvm.ptr // CHECK: omp.yield -// CHECK: omp.terminator // CHECK: omp.terminator // CHECK: llvm.return @@ -781,7 +772,6 @@ func.func @_QPsimple_reduction(%arg0: !fir.ref>> fir.store %11 to %prv : !fir.ref> omp.yield } - omp.terminator } omp.terminator } diff --git a/flang/test/Lower/OpenMP/Todo/omp-default-clause-inner-loop.f90 b/flang/test/Lower/OpenMP/Todo/omp-default-clause-inner-loop.f90 index 42ebd37d1c431..77a1304f39a48 100644 --- a/flang/test/Lower/OpenMP/Todo/omp-default-clause-inner-loop.f90 +++ b/flang/test/Lower/OpenMP/Todo/omp-default-clause-inner-loop.f90 @@ -24,7 +24,6 @@ ! CHECK: fir.store %[[result]] to %{{.*}} : !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/copyin.f90 b/flang/test/Lower/OpenMP/copyin.f90 index b1c6b9420f4c4..f3d147c10668f 100644 --- a/flang/test/Lower/OpenMP/copyin.f90 +++ b/flang/test/Lower/OpenMP/copyin.f90 @@ -166,7 +166,6 @@ subroutine copyin_derived_type() ! CHECK: fir.call @_QPsub4(%[[VAL_9]]#1) fastmath : (!fir.ref) -> () ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -338,7 +337,6 @@ subroutine common_1() ! CHECK: hlfir.assign %[[VAL_40]] to %[[VAL_31]]#0 : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/default-clause-byref.f90 b/flang/test/Lower/OpenMP/default-clause-byref.f90 index 6cdff407a9790..654c13ada9e39 100644 --- a/flang/test/Lower/OpenMP/default-clause-byref.f90 +++ b/flang/test/Lower/OpenMP/default-clause-byref.f90 @@ -350,7 +350,6 @@ subroutine skipped_default_clause_checks() !CHECK-NEXT: omp.loop_nest (%[[ARG:.*]]) {{.*}} { !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !CHECK: omp.terminator !CHECK: } diff --git a/flang/test/Lower/OpenMP/default-clause.f90 b/flang/test/Lower/OpenMP/default-clause.f90 index 1b1b47c40b545..c004813a911f7 100644 --- a/flang/test/Lower/OpenMP/default-clause.f90 +++ b/flang/test/Lower/OpenMP/default-clause.f90 @@ -390,7 +390,6 @@ subroutine skipped_default_clause_checks() !CHECK-NEXT: omp.loop_nest (%[[ARG:.*]]) {{.*}} { !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !CHECK: omp.terminator !CHECK: } diff --git a/flang/test/Lower/OpenMP/hlfir-wsloop.f90 b/flang/test/Lower/OpenMP/hlfir-wsloop.f90 index fc5b5999f2708..f7b0ba681efeb 100644 --- a/flang/test/Lower/OpenMP/hlfir-wsloop.f90 +++ b/flang/test/Lower/OpenMP/hlfir-wsloop.f90 @@ -22,7 +22,6 @@ subroutine simple_loop print*, i end do ! CHECK: omp.yield - ! CHECK: omp.terminator !$OMP END DO ! CHECK: omp.terminator !$OMP END PARALLEL diff --git a/flang/test/Lower/OpenMP/lastprivate-commonblock.f90 b/flang/test/Lower/OpenMP/lastprivate-commonblock.f90 index dcba34b2da8ef..faa3d3e053f34 100644 --- a/flang/test/Lower/OpenMP/lastprivate-commonblock.f90 +++ b/flang/test/Lower/OpenMP/lastprivate-commonblock.f90 @@ -32,7 +32,6 @@ !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } subroutine lastprivate_common common /c/ x, y diff --git a/flang/test/Lower/OpenMP/lastprivate-iv.f90 b/flang/test/Lower/OpenMP/lastprivate-iv.f90 index 609192471eae1..63a81e818bc8b 100644 --- a/flang/test/Lower/OpenMP/lastprivate-iv.f90 +++ b/flang/test/Lower/OpenMP/lastprivate-iv.f90 @@ -28,7 +28,6 @@ !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } subroutine lastprivate_iv_inc() integer :: i @@ -66,7 +65,6 @@ subroutine lastprivate_iv_inc() !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } subroutine lastprivate_iv_dec() integer :: i diff --git a/flang/test/Lower/OpenMP/location.f90 b/flang/test/Lower/OpenMP/location.f90 index 5d340937a81ce..2dab22a1c1f90 100644 --- a/flang/test/Lower/OpenMP/location.f90 +++ b/flang/test/Lower/OpenMP/location.f90 @@ -35,7 +35,6 @@ subroutine sub_loop() print *, i !CHECK: omp.yield loc(#[[LOOP_LOC:.*]]) !CHECK: } loc(#[[LOOP_LOC]]) -!CHECK: omp.terminator loc(#[[LOOP_LOC]]) !CHECK: } loc(#[[LOOP_LOC]]) end do !$omp end do @@ -64,8 +63,8 @@ subroutine sub_if(c) !CHECK: #[[PAR_LOC]] = loc("{{.*}}location.f90":9:9) !CHECK: #[[TAR_LOC]] = loc("{{.*}}location.f90":21:9) !CHECK: #[[LOOP_LOC]] = loc("{{.*}}location.f90":33:9) -!CHECK: #[[BAR_LOC]] = loc("{{.*}}location.f90":47:9) -!CHECK: #[[TW_LOC]] = loc("{{.*}}location.f90":49:9) -!CHECK: #[[TY_LOC]] = loc("{{.*}}location.f90":51:9) -!CHECK: #[[IF_LOC]] = loc("{{.*}}location.f90":58:14) -!CHECK: #[[TASK_LOC]] = loc("{{.*}}location.f90":58:9) +!CHECK: #[[BAR_LOC]] = loc("{{.*}}location.f90":46:9) +!CHECK: #[[TW_LOC]] = loc("{{.*}}location.f90":48:9) +!CHECK: #[[TY_LOC]] = loc("{{.*}}location.f90":50:9) +!CHECK: #[[IF_LOC]] = loc("{{.*}}location.f90":57:14) +!CHECK: #[[TASK_LOC]] = loc("{{.*}}location.f90":57:9) diff --git a/flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90 b/flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90 index bc5baf4e1cf60..86309a24f91a0 100644 --- a/flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90 +++ b/flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90 @@ -41,7 +41,6 @@ !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } subroutine lastprivate_character(arg1) @@ -80,7 +79,6 @@ subroutine lastprivate_character(arg1) !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } subroutine lastprivate_int(arg1) @@ -124,7 +122,6 @@ subroutine lastprivate_int(arg1) !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } subroutine mult_lastprivate_int(arg1, arg2) @@ -169,7 +166,6 @@ subroutine mult_lastprivate_int(arg1, arg2) !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } subroutine mult_lastprivate_int2(arg1, arg2) @@ -217,7 +213,6 @@ subroutine mult_lastprivate_int2(arg1, arg2) !CHECK-NEXT: } !CHECK-NEXT: omp.yield !CHECK-NEXT: } -!CHECK-NEXT: omp.terminator !CHECK-NEXT: } subroutine firstpriv_lastpriv_int(arg1, arg2) @@ -265,7 +260,6 @@ subroutine firstpriv_lastpriv_int(arg1, arg2) !CHECK-NEXT: } !CHECK-NEXT: omp.yield !CHECK-NEXT: } -!CHECK-NEXT: omp.terminator !CHECK-NEXT: } subroutine firstpriv_lastpriv_int2(arg1) diff --git a/flang/test/Lower/OpenMP/parallel-private-clause-fixes.f90 b/flang/test/Lower/OpenMP/parallel-private-clause-fixes.f90 index 073146b8b2e87..5e76e8ff1663b 100644 --- a/flang/test/Lower/OpenMP/parallel-private-clause-fixes.f90 +++ b/flang/test/Lower/OpenMP/parallel-private-clause-fixes.f90 @@ -91,7 +91,6 @@ ! CHECK: fir.store %[[VAL_12]]#1 to %[[PRIV_J_DECL]]#1 : !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/parallel-private-clause.f90 b/flang/test/Lower/OpenMP/parallel-private-clause.f90 index edb8f9193b827..8dc843fc9d96a 100644 --- a/flang/test/Lower/OpenMP/parallel-private-clause.f90 +++ b/flang/test/Lower/OpenMP/parallel-private-clause.f90 @@ -272,7 +272,6 @@ subroutine simple_loop_1 print*, i end do ! FIRDialect: omp.yield - ! FIRDialect: omp.terminator !$OMP END DO ! FIRDialect: omp.terminator !$OMP END PARALLEL @@ -306,7 +305,6 @@ subroutine simple_loop_2 print*, i end do ! FIRDialect: omp.yield - ! FIRDialect: omp.terminator ! FIRDialect: {{%.*}} = fir.load %[[R_DECL]]#0 : !fir.ref>> ! FIRDialect: fir.if {{%.*}} { ! FIRDialect: [[LD:%.*]] = fir.load %[[R_DECL]]#0 : !fir.ref>> @@ -346,7 +344,6 @@ subroutine simple_loop_3 print*, i end do ! FIRDialect: omp.yield - ! FIRDialect: omp.terminator ! FIRDialect: {{%.*}} = fir.load [[R_DECL]]#0 : !fir.ref>> ! FIRDialect: fir.if {{%.*}} { ! FIRDialect: [[LD:%.*]] = fir.load [[R_DECL]]#0 : !fir.ref>> diff --git a/flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90 b/flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90 index 7a2db3299784c..dabd495d733b5 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90 @@ -115,7 +115,6 @@ program reduce ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_29]] : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90 b/flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90 index 1273b250117da..01d8dc33f40e6 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90 @@ -127,7 +127,6 @@ program reduce ! CHECK: hlfir.assign %[[VAL_36]] to %[[VAL_39]] : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/parallel-reduction3.f90 b/flang/test/Lower/OpenMP/parallel-reduction3.f90 index 591f41cb94660..70b4f0f12820b 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction3.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction3.f90 @@ -102,7 +102,6 @@ ! CHECK: hlfir.destroy %[[VAL_28]] : !hlfir.expr ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/parallel-wsloop-firstpriv.f90 b/flang/test/Lower/OpenMP/parallel-wsloop-firstpriv.f90 index de3f42be10482..4e7c2c15df743 100644 --- a/flang/test/Lower/OpenMP/parallel-wsloop-firstpriv.f90 +++ b/flang/test/Lower/OpenMP/parallel-wsloop-firstpriv.f90 @@ -29,7 +29,6 @@ subroutine omp_do_firstprivate(a) ! CHECK-NEXT: fir.call @_QPfoo(%[[I_PVT_DECL]]#1, %[[A_PVT_DECL]]#1) {{.*}}: (!fir.ref, !fir.ref) -> () ! CHECK-NEXT: omp.yield ! CHECK-NEXT: } - ! CHECK-NEXT: omp.terminator ! CHECK-NEXT: } do i=1, a call foo(i, a) @@ -70,7 +69,6 @@ subroutine omp_do_firstprivate2(a, n) ! CHECK: fir.store %[[ARG2]] to %[[I_PVT_DECL]]#1 : !fir.ref ! CHECK: fir.call @_QPfoo(%[[I_PVT_DECL]]#1, %[[A_PVT_DECL]]#1) {{.*}}: (!fir.ref, !fir.ref) -> () ! CHECK: omp.yield - ! CHECK: omp.terminator do i= a, n call foo(i, a) end do diff --git a/flang/test/Lower/OpenMP/parallel-wsloop-lastpriv.f90 b/flang/test/Lower/OpenMP/parallel-wsloop-lastpriv.f90 index 254aeff21d06e..dbde5291c01c8 100644 --- a/flang/test/Lower/OpenMP/parallel-wsloop-lastpriv.f90 +++ b/flang/test/Lower/OpenMP/parallel-wsloop-lastpriv.f90 @@ -39,7 +39,6 @@ subroutine omp_do_lastprivate(a) ! CHECK-NEXT: omp.yield ! CHECK-NEXT: } - ! CHECK-NEXT: omp.terminator ! CHECK-NEXT: } do i=1, a call foo(i, a) @@ -90,7 +89,6 @@ subroutine omp_do_lastprivate2(a, n) ! CHECK: } ! CHECK: omp.yield - ! CHECK: omp.terminator do i= a, n call foo(i, a) end do @@ -148,7 +146,6 @@ subroutine omp_do_lastprivate_collapse2(a) ! CHECK-NEXT: omp.yield ! CHECK-NEXT: } - ! CHECK-NEXT: omp.terminator ! CHECK-NEXT: } do i=1, a do j=1, a @@ -224,7 +221,6 @@ subroutine omp_do_lastprivate_collapse3(a) ! CHECK-NEXT: omp.yield ! CHECK-NEXT: } - ! CHECK-NEXT: omp.terminator ! CHECK-NEXT: } do i=1, a do j=1, a diff --git a/flang/test/Lower/OpenMP/parallel-wsloop.f90 b/flang/test/Lower/OpenMP/parallel-wsloop.f90 index 4a9c66857ffaa..cba5209f85989 100644 --- a/flang/test/Lower/OpenMP/parallel-wsloop.f90 +++ b/flang/test/Lower/OpenMP/parallel-wsloop.f90 @@ -21,7 +21,6 @@ subroutine simple_parallel_do end do ! CHECK: omp.yield ! CHECK: omp.terminator - ! CHECK: omp.terminator !$OMP END PARALLEL DO end subroutine @@ -51,7 +50,6 @@ subroutine parallel_do_with_parallel_clauses(cond, nt) end do ! CHECK: omp.yield ! CHECK: omp.terminator - ! CHECK: omp.terminator !$OMP END PARALLEL DO end subroutine @@ -77,7 +75,6 @@ subroutine parallel_do_with_clauses(nt) end do ! CHECK: omp.yield ! CHECK: omp.terminator - ! CHECK: omp.terminator !$OMP END PARALLEL DO end subroutine @@ -120,7 +117,6 @@ subroutine parallel_do_with_privatisation_clauses(cond,nt) end do ! CHECK: omp.yield ! CHECK: omp.terminator - ! CHECK: omp.terminator !$OMP END PARALLEL DO end subroutine @@ -165,7 +161,6 @@ end subroutine parallel_private_do ! CHECK: fir.call @_QPfoo(%[[I_PRIV_DECL]]#1, %[[COND_DECL]]#1, %[[NT_PRIV_DECL]]#1) {{.*}}: (!fir.ref, !fir.ref>, !fir.ref) -> () ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -212,7 +207,6 @@ end subroutine omp_parallel_multiple_firstprivate_do ! CHECK: fir.call @_QPbar(%[[I_PRIV_DECL]]#1, %[[A_PRIV_DECL]]#1) {{.*}}: (!fir.ref, !fir.ref) -> () ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -264,7 +258,6 @@ end subroutine parallel_do_private ! CHECK: fir.call @_QPfoo(%[[I_PRIV_DECL]]#1, %[[COND_PRIV_DECL]]#1, %[[NT_PRIV_DECL]]#1) {{.*}}: (!fir.ref, !fir.ref>, !fir.ref) -> () ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -317,7 +310,6 @@ end subroutine omp_parallel_do_multiple_firstprivate ! CHECK: fir.call @_QPbar(%[[I_PRIV_DECL]]#1, %[[A_PRIV_DECL]]#1) {{.*}}: (!fir.ref, !fir.ref) -> () ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/private-derived-type.f90 b/flang/test/Lower/OpenMP/private-derived-type.f90 index 230484f20c11d..af9a5b72e7175 100644 --- a/flang/test/Lower/OpenMP/private-derived-type.f90 +++ b/flang/test/Lower/OpenMP/private-derived-type.f90 @@ -37,7 +37,6 @@ end subroutine s4 ! Check we do call FortranAInitialize on the derived type ! CHECK: %[[VAL_30:.*]] = fir.call @_FortranAInitialize(%[[VAL_28]], %[[VAL_29]], %[[VAL_27]]) fastmath : (!fir.box, !fir.ref, i32) -> none ! CHECK: omp.wsloop { -! CHECK: omp.terminator ! CHECK: } ! CHECK: %[[VAL_39:.*]] = fir.embox %[[VAL_9]]#1 : (!fir.ref>}>>) -> !fir.box>}>> ! CHECK: %[[VAL_40:.*]] = fir.convert %[[VAL_39]] : (!fir.box>}>>) -> !fir.box diff --git a/flang/test/Lower/OpenMP/simd.f90 b/flang/test/Lower/OpenMP/simd.f90 index 3b2aeceb4c3f9..f574a1265e06c 100644 --- a/flang/test/Lower/OpenMP/simd.f90 +++ b/flang/test/Lower/OpenMP/simd.f90 @@ -267,7 +267,6 @@ subroutine lastprivate_with_simd !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !$omp simd lastprivate(sum) do i = 1, 100 diff --git a/flang/test/Lower/OpenMP/stop-stmt-in-region.f90 b/flang/test/Lower/OpenMP/stop-stmt-in-region.f90 index f8f2604caacca..d119c2120c7c5 100644 --- a/flang/test/Lower/OpenMP/stop-stmt-in-region.f90 +++ b/flang/test/Lower/OpenMP/stop-stmt-in-region.f90 @@ -106,7 +106,6 @@ subroutine test_stop_in_region3() ! CHECK: ^bb3: ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: cf.br ^bb1 ! CHECK: ^bb1: diff --git a/flang/test/Lower/OpenMP/target.f90 b/flang/test/Lower/OpenMP/target.f90 index ab33b6b380831..63a43e750979d 100644 --- a/flang/test/Lower/OpenMP/target.f90 +++ b/flang/test/Lower/OpenMP/target.f90 @@ -601,7 +601,6 @@ subroutine omp_target_parallel_do end do !CHECK: omp.yield !CHECK: } - !CHECK: omp.terminator !CHECK: } !CHECK: omp.terminator !CHECK: } diff --git a/flang/test/Lower/OpenMP/unstructured.f90 b/flang/test/Lower/OpenMP/unstructured.f90 index e7860b1d6ca8c..a0955c8440c1c 100644 --- a/flang/test/Lower/OpenMP/unstructured.f90 +++ b/flang/test/Lower/OpenMP/unstructured.f90 @@ -79,7 +79,6 @@ subroutine ss2(n) ! unstructured OpenMP construct; loop exit inside construct ! CHECK: @_FortranAioOutputInteger32(%{{.*}}, %[[LOAD_1]]) ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: %[[ALLOCA_1:.*]] = fir.alloca i32 {{{.*}}, pinned, {{.*}}} @@ -101,7 +100,6 @@ subroutine ss2(n) ! unstructured OpenMP construct; loop exit inside construct ! CHECK: ^bb6: // 2 preds: ^bb2, ^bb4 ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: br ^bb1 ! CHECK: ^bb4: // pred: ^bb1 @@ -144,7 +142,6 @@ subroutine ss3(n) ! nested unstructured OpenMP constructs ! CHECK: } ! CHECK-NEXT: omp.yield ! CHECK-NEXT: } -! CHECK-NEXT: omp.terminator ! CHECK-NEXT: } ! CHECK: omp.terminator ! CHECK-NEXT: } @@ -179,7 +176,6 @@ subroutine ss4(n) ! CYCLE in OpenMP wsloop constructs ! CHECK: ^[[BB6]]: ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -222,7 +218,6 @@ subroutine ss5() ! EXIT inside OpenMP wsloop (inside parallel) ! CHECK: ^[[BB6]]: ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: br ^[[BB1_OUTER]] ! CHECK: ^[[BB3_OUTER]]: @@ -269,7 +264,6 @@ subroutine ss6() ! EXIT inside OpenMP wsloop in a do loop (inside parallel) ! CHECK-NEXT: ^[[BB6]]: ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -310,7 +304,6 @@ subroutine ss7() ! EXIT inside OpenMP parallel do (inside do loop) ! CHECK-NEXT: ^[[BB6]]: ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-chunks.f90 b/flang/test/Lower/OpenMP/wsloop-chunks.f90 index cacb5b0d4b4a1..0fb7d6f1b64fa 100644 --- a/flang/test/Lower/OpenMP/wsloop-chunks.f90 +++ b/flang/test/Lower/OpenMP/wsloop-chunks.f90 @@ -27,7 +27,6 @@ program wsloop ! CHECK: {{.*}} = fir.call @_FortranAioOutputInteger32({{.*}}, %[[LOAD_IV]]) {{.*}}: (!fir.ref, i32) -> i1 ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } end do @@ -50,7 +49,6 @@ program wsloop ! CHECK: {{.*}} = fir.call @_FortranAioOutputInteger32({{.*}}, %[[VAL_25]]) {{.*}}: (!fir.ref, i32) -> i1 ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } end do @@ -77,7 +75,6 @@ program wsloop ! CHECK: {{.*}} = fir.call @_FortranAioOutputInteger32({{.*}}, %[[VAL_40]]) {{.*}}: (!fir.ref, i32) -> i1 ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: return ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-collapse.f90 b/flang/test/Lower/OpenMP/wsloop-collapse.f90 index 67351ca275efb..61ee76d589107 100644 --- a/flang/test/Lower/OpenMP/wsloop-collapse.f90 +++ b/flang/test/Lower/OpenMP/wsloop-collapse.f90 @@ -84,7 +84,6 @@ program wsloop_collapse !CHECK: hlfir.assign %[[VAL_42]] to %[[VAL_19]]#0 : i32, !fir.ref !CHECK: omp.yield !CHECK-NEXT: } -!CHECK-NEXT: omp.terminator x = x + i + j + k end do end do diff --git a/flang/test/Lower/OpenMP/wsloop-monotonic.f90 b/flang/test/Lower/OpenMP/wsloop-monotonic.f90 index ec1b216a8695f..9659fff2d42e7 100644 --- a/flang/test/Lower/OpenMP/wsloop-monotonic.f90 +++ b/flang/test/Lower/OpenMP/wsloop-monotonic.f90 @@ -27,7 +27,6 @@ program wsloop_dynamic !CHECK: fir.call @_FortranAioEndIoStatement(%[[RTBEGIN]]) {{.*}}: (!fir.ref) -> i32 end do !CHECK: omp.yield -!CHECK: omp.terminator !CHECK: omp.terminator !CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-nonmonotonic.f90 b/flang/test/Lower/OpenMP/wsloop-nonmonotonic.f90 index e011a8de1e69e..b1bea525ff489 100644 --- a/flang/test/Lower/OpenMP/wsloop-nonmonotonic.f90 +++ b/flang/test/Lower/OpenMP/wsloop-nonmonotonic.f90 @@ -30,7 +30,6 @@ program wsloop_dynamic end do !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !CHECK: omp.terminator !CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-ordered.f90 b/flang/test/Lower/OpenMP/wsloop-ordered.f90 index f4fa81c52315c..5fa53f7b28447 100644 --- a/flang/test/Lower/OpenMP/wsloop-ordered.f90 +++ b/flang/test/Lower/OpenMP/wsloop-ordered.f90 @@ -10,7 +10,6 @@ subroutine wsloop_ordered_no_para() ! CHECK-NEXT: omp.loop_nest (%{{.*}}) : i32 = (%{{.*}}) to (%{{.*}}) inclusive step (%{{.*}}) { ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } !$omp do ordered @@ -32,7 +31,6 @@ subroutine wsloop_ordered_with_para() ! CHECK-NEXT: omp.loop_nest (%{{.*}}) : i32 = (%{{.*}}) to (%{{.*}}) inclusive step (%{{.*}}) { ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } !$omp do ordered(1) diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-add-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-add-byref.f90 index 44fb49239eab4..c38a79191bc4e 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-add-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-add-byref.f90 @@ -100,7 +100,6 @@ ! CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_12]]#0 : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -144,7 +143,6 @@ subroutine simple_int_reduction ! CHECK: hlfir.assign %[[VAL_16]] to %[[VAL_12]]#0 : f32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -187,7 +185,6 @@ subroutine simple_real_reduction ! CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_12]]#0 : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -230,7 +227,6 @@ subroutine simple_int_reduction_switch_order ! CHECK: hlfir.assign %[[VAL_16]] to %[[VAL_12]]#0 : f32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -290,7 +286,6 @@ subroutine simple_real_reduction_switch_order ! CHECK: hlfir.assign %[[VAL_31]] to %[[VAL_22]]#0 : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -357,7 +352,6 @@ subroutine multiple_int_reductions_same_type ! CHECK: hlfir.assign %[[VAL_34]] to %[[VAL_22]]#0 : f32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -433,7 +427,6 @@ subroutine multiple_real_reductions_same_type ! CHECK: hlfir.assign %[[VAL_42]] to %[[VAL_27]]#0 : f64, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-add.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-add.f90 index d1617bc839cc8..c5278e0ef8815 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-add.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-add.f90 @@ -68,7 +68,6 @@ ! CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_12]]#0 : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -112,7 +111,6 @@ subroutine simple_int_reduction ! CHECK: hlfir.assign %[[VAL_16]] to %[[VAL_12]]#0 : f32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -155,7 +153,6 @@ subroutine simple_real_reduction ! CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_12]]#0 : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -198,7 +195,6 @@ subroutine simple_int_reduction_switch_order ! CHECK: hlfir.assign %[[VAL_16]] to %[[VAL_12]]#0 : f32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -258,7 +254,6 @@ subroutine simple_real_reduction_switch_order ! CHECK: hlfir.assign %[[VAL_31]] to %[[VAL_22]]#0 : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -325,7 +320,6 @@ subroutine multiple_int_reductions_same_type ! CHECK: hlfir.assign %[[VAL_34]] to %[[VAL_22]]#0 : f32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -401,7 +395,6 @@ subroutine multiple_real_reductions_same_type ! CHECK: hlfir.assign %[[VAL_42]] to %[[VAL_27]]#0 : f64, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90 index 6b901bae539ff..a49eba69ff38c 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90 @@ -252,7 +252,6 @@ program reduce15 ! CHECK: hlfir.destroy %[[VAL_68]] : !hlfir.expr ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } @@ -295,7 +294,6 @@ program reduce15 ! CHECK: hlfir.destroy %[[VAL_100]] : !hlfir.expr ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-allocatable.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-allocatable.f90 index 66db62a36bc17..ba7aea0d96c5b 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-allocatable.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-allocatable.f90 @@ -90,7 +90,6 @@ program reduce ! CHECK: hlfir.assign %[[VAL_17]] to %[[VAL_16]]#0 realloc : i32, !fir.ref>> ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90 index d881ff8c1a026..9785f77c0e091 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90 @@ -103,7 +103,6 @@ subroutine reduce(r) ! CHECK: hlfir.assign %[[VAL_18]] to %[[VAL_21]] : f64, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 index afdd486c7be2a..ea5df5a836972 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 @@ -99,7 +99,6 @@ program reduce ! CHECK: hlfir.assign %[[VAL_22]] to %[[VAL_25]] : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 index ee77332e9b412..9815cfa9c3150 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 @@ -107,7 +107,6 @@ program reduce ! CHECK: hlfir.assign %[[VAL_30]] to %[[VAL_33]] : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-iand-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-iand-byref.f90 index 0696236e8f073..829229807698a 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-iand-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-iand-byref.f90 @@ -49,7 +49,6 @@ ! CHECK: %[[VAL_20:.*]] = arith.andi %[[VAL_18]], %[[VAL_19]] : i32 ! CHECK: hlfir.assign %[[VAL_20]] to %[[VAL_14]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-iand.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-iand.f90 index 713e50f72e9dc..6c060f2e5292a 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-iand.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-iand.f90 @@ -41,7 +41,6 @@ ! CHECK: %[[VAL_20:.*]] = arith.andi %[[VAL_18]], %[[VAL_19]] : i32 ! CHECK: hlfir.assign %[[VAL_20]] to %[[VAL_14]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-ieor-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-ieor-byref.f90 index 5b0758ac3fcc1..284ada404bd60 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-ieor-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-ieor-byref.f90 @@ -43,7 +43,6 @@ !CHECK: hlfir.assign %[[RES]] to %[[PRV_DECL]]#0 : i32, !fir.ref !CHECK: omp.yield !CHECK: omp.terminator -!CHECK: omp.terminator subroutine reduction_ieor(y) integer :: x, y(:) diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-ieor.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-ieor.f90 index 958cc6f87e4f8..e67253a413ce2 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-ieor.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-ieor.f90 @@ -32,7 +32,6 @@ !CHECK: hlfir.assign %[[RES]] to %[[PRV_DECL]]#0 : i32, !fir.ref !CHECK: omp.yield !CHECK: omp.terminator -!CHECK: omp.terminator subroutine reduction_ieor(y) integer :: x, y(:) diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-ior-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-ior-byref.f90 index 8604a274a659f..315121cc7beb7 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-ior-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-ior-byref.f90 @@ -47,7 +47,6 @@ ! CHECK: %[[VAL_20:.*]] = arith.ori %[[VAL_18]], %[[VAL_19]] : i32 ! CHECK: hlfir.assign %[[VAL_20]] to %[[VAL_14]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-ior.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-ior.f90 index a80838047bac3..3da250da9703d 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-ior.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-ior.f90 @@ -41,7 +41,6 @@ ! CHECK: %[[VAL_20:.*]] = arith.ori %[[VAL_18]], %[[VAL_19]] : i32 ! CHECK: hlfir.assign %[[VAL_20]] to %[[VAL_14]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-logical-and-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-logical-and-byref.f90 index 65072f3ccce35..30908b6bdd4ce 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-logical-and-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-logical-and-byref.f90 @@ -59,7 +59,6 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -109,7 +108,6 @@ end subroutine simple_reduction ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -190,7 +188,6 @@ subroutine simple_reduction_switch_order(y) ! CHECK: %[[VAL_56:.*]] = fir.convert %[[VAL_55]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_56]] to %[[VAL_29]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-logical-and.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-logical-and.f90 index 818e1a652064e..367683de02080 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-logical-and.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-logical-and.f90 @@ -51,7 +51,6 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -101,7 +100,6 @@ end subroutine simple_reduction ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -182,7 +180,6 @@ subroutine simple_reduction_switch_order(y) ! CHECK: %[[VAL_56:.*]] = fir.convert %[[VAL_55]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_56]] to %[[VAL_29]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-logical-eqv-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-logical-eqv-byref.f90 index 71d4a34da2d34..9137dd8ff4454 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-logical-eqv-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-logical-eqv-byref.f90 @@ -59,7 +59,6 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -108,7 +107,6 @@ subroutine simple_reduction(y) ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -189,7 +187,6 @@ subroutine simple_reduction_switch_order(y) ! CHECK: %[[VAL_56:.*]] = fir.convert %[[VAL_55]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_56]] to %[[VAL_29]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-logical-eqv.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-logical-eqv.f90 index 926cf380b0f22..d1ef676c37407 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-logical-eqv.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-logical-eqv.f90 @@ -51,7 +51,6 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -100,7 +99,6 @@ subroutine simple_reduction(y) ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -181,7 +179,6 @@ subroutine simple_reduction_switch_order(y) ! CHECK: %[[VAL_56:.*]] = fir.convert %[[VAL_55]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_56]] to %[[VAL_29]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-logical-neqv-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-logical-neqv-byref.f90 index 3b7f5771b87c5..d1491a0f5561d 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-logical-neqv-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-logical-neqv-byref.f90 @@ -59,7 +59,6 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -109,7 +108,6 @@ subroutine simple_reduction(y) ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -192,7 +190,6 @@ subroutine simple_reduction_switch_order(y) ! CHECK: %[[VAL_56:.*]] = fir.convert %[[VAL_55]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_56]] to %[[VAL_29]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-logical-neqv.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-logical-neqv.f90 index 1a1bffad19d27..b4df699c49ffa 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-logical-neqv.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-logical-neqv.f90 @@ -51,7 +51,6 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -101,7 +100,6 @@ subroutine simple_reduction(y) ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -184,7 +182,6 @@ subroutine simple_reduction_switch_order(y) ! CHECK: %[[VAL_56:.*]] = fir.convert %[[VAL_55]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_56]] to %[[VAL_29]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-logical-or-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-logical-or-byref.f90 index 22239ea69e980..8f4a6c22c1d74 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-logical-or-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-logical-or-byref.f90 @@ -58,7 +58,6 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -107,7 +106,6 @@ subroutine simple_reduction(y) ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -188,7 +186,6 @@ subroutine simple_reduction_switch_order(y) ! CHECK: %[[VAL_56:.*]] = fir.convert %[[VAL_55]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_56]] to %[[VAL_29]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-logical-or.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-logical-or.f90 index 6bdf47bc89d64..9d367797ec216 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-logical-or.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-logical-or.f90 @@ -51,7 +51,6 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -100,7 +99,6 @@ subroutine simple_reduction(y) ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_26]] to %[[VAL_17]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -181,7 +179,6 @@ subroutine simple_reduction_switch_order(y) ! CHECK: %[[VAL_56:.*]] = fir.convert %[[VAL_55]] : (i1) -> !fir.logical<4> ! CHECK: hlfir.assign %[[VAL_56]] to %[[VAL_29]]#0 : !fir.logical<4>, !fir.ref> ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-max-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-max-byref.f90 index 56a43abca42a7..9abff8ccfa3b6 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-max-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-max-byref.f90 @@ -63,7 +63,6 @@ ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_18]], %[[VAL_19]] : i32 ! CHECK: hlfir.assign %[[VAL_21]] to %[[VAL_14]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK-LABEL: func.func @_QPreduction_max_real( @@ -94,7 +93,6 @@ ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_18]], %[[VAL_19]] : f32 ! CHECK: hlfir.assign %[[VAL_21]] to %[[VAL_14]]#0 : f32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: omp.parallel { ! CHECK: %[[VAL_30:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}} @@ -120,7 +118,6 @@ ! CHECK: hlfir.assign %[[VAL_47]] to %[[VAL_37]]#0 : f32, !fir.ref ! CHECK: } ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-max.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-max.f90 index 775554fd3dcca..7237d3f903b74 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-max.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-max.f90 @@ -53,7 +53,6 @@ ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_18]], %[[VAL_19]] : i32 ! CHECK: hlfir.assign %[[VAL_21]] to %[[VAL_14]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK-LABEL: func.func @_QPreduction_max_real( @@ -84,7 +83,6 @@ ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_18]], %[[VAL_19]] : f32 ! CHECK: hlfir.assign %[[VAL_21]] to %[[VAL_14]]#0 : f32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: omp.parallel { ! CHECK: %[[VAL_30:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}} @@ -110,7 +108,6 @@ ! CHECK: hlfir.assign %[[VAL_47]] to %[[VAL_37]]#0 : f32, !fir.ref ! CHECK: } ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-min-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-min-byref.f90 index d16de4a867a24..a4bfbaa09d2fa 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-min-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-min-byref.f90 @@ -63,7 +63,6 @@ ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_18]], %[[VAL_19]] : i32 ! CHECK: hlfir.assign %[[VAL_21]] to %[[VAL_14]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK-LABEL: func.func @_QPreduction_min_real( @@ -95,7 +94,6 @@ ! CHECK: hlfir.assign %[[VAL_21]] to %[[VAL_14]]#0 : f32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.parallel { @@ -122,7 +120,6 @@ ! CHECK: hlfir.assign %[[VAL_47]] to %[[VAL_37]]#0 : f32, !fir.ref ! CHECK: } ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-min.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-min.f90 index 04957c7287eae..ce9e53a17523c 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-min.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-min.f90 @@ -53,7 +53,6 @@ ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_18]], %[[VAL_19]] : i32 ! CHECK: hlfir.assign %[[VAL_21]] to %[[VAL_14]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK-LABEL: func.func @_QPreduction_min_real( @@ -85,7 +84,6 @@ ! CHECK: hlfir.assign %[[VAL_21]] to %[[VAL_14]]#0 : f32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.parallel { @@ -112,7 +110,6 @@ ! CHECK: hlfir.assign %[[VAL_47]] to %[[VAL_37]]#0 : f32, !fir.ref ! CHECK: } ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-min2.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-min2.f90 index 834fb03c1d14d..d83ebb77af3eb 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-min2.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-min2.f90 @@ -47,6 +47,5 @@ program reduce ! CHECK: hlfir.assign %[[VAL_12]] to %[[VAL_11]]#0 : i32, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-mul-byref.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-mul-byref.f90 index 04c6787ab01e0..18554fbb72aee 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-mul-byref.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-mul-byref.f90 @@ -102,7 +102,6 @@ ! CHECK: %[[VAL_15:.*]] = arith.muli %[[VAL_13]], %[[VAL_14]] : i32 ! CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_12]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -141,7 +140,6 @@ subroutine simple_int_reduction ! CHECK: %[[VAL_16:.*]] = arith.mulf %[[VAL_13]], %[[VAL_15]] fastmath : f32 ! CHECK: hlfir.assign %[[VAL_16]] to %[[VAL_12]]#0 : f32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -179,7 +177,6 @@ subroutine simple_real_reduction ! CHECK: %[[VAL_15:.*]] = arith.muli %[[VAL_13]], %[[VAL_14]] : i32 ! CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_12]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -218,7 +215,6 @@ subroutine simple_int_reduction_switch_order ! CHECK: %[[VAL_16:.*]] = arith.mulf %[[VAL_14]], %[[VAL_15]] fastmath : f32 ! CHECK: hlfir.assign %[[VAL_16]] to %[[VAL_12]]#0 : f32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -274,7 +270,6 @@ subroutine simple_real_reduction_switch_order ! CHECK: %[[VAL_31:.*]] = arith.muli %[[VAL_29]], %[[VAL_30]] : i32 ! CHECK: hlfir.assign %[[VAL_31]] to %[[VAL_22]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -337,7 +332,6 @@ subroutine multiple_int_reductions_same_type ! CHECK: %[[VAL_34:.*]] = arith.mulf %[[VAL_31]], %[[VAL_33]] fastmath : f32 ! CHECK: hlfir.assign %[[VAL_34]] to %[[VAL_22]]#0 : f32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -409,7 +403,6 @@ subroutine multiple_real_reductions_same_type ! CHECK: %[[VAL_42:.*]] = arith.mulf %[[VAL_39]], %[[VAL_41]] fastmath : f64 ! CHECK: hlfir.assign %[[VAL_42]] to %[[VAL_27]]#0 : f64, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-mul.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-mul.f90 index d7cafb2285222..f5c12ccf61f76 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-mul.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-mul.f90 @@ -69,7 +69,6 @@ ! CHECK: %[[VAL_15:.*]] = arith.muli %[[VAL_13]], %[[VAL_14]] : i32 ! CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_12]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -108,7 +107,6 @@ subroutine simple_int_reduction ! CHECK: %[[VAL_16:.*]] = arith.mulf %[[VAL_13]], %[[VAL_15]] fastmath : f32 ! CHECK: hlfir.assign %[[VAL_16]] to %[[VAL_12]]#0 : f32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -146,7 +144,6 @@ subroutine simple_real_reduction ! CHECK: %[[VAL_15:.*]] = arith.muli %[[VAL_13]], %[[VAL_14]] : i32 ! CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_12]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -185,7 +182,6 @@ subroutine simple_int_reduction_switch_order ! CHECK: %[[VAL_16:.*]] = arith.mulf %[[VAL_14]], %[[VAL_15]] fastmath : f32 ! CHECK: hlfir.assign %[[VAL_16]] to %[[VAL_12]]#0 : f32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -241,7 +237,6 @@ subroutine simple_real_reduction_switch_order ! CHECK: %[[VAL_31:.*]] = arith.muli %[[VAL_29]], %[[VAL_30]] : i32 ! CHECK: hlfir.assign %[[VAL_31]] to %[[VAL_22]]#0 : i32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -304,7 +299,6 @@ subroutine multiple_int_reductions_same_type ! CHECK: %[[VAL_34:.*]] = arith.mulf %[[VAL_31]], %[[VAL_33]] fastmath : f32 ! CHECK: hlfir.assign %[[VAL_34]] to %[[VAL_22]]#0 : f32, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return @@ -376,7 +370,6 @@ subroutine multiple_real_reductions_same_type ! CHECK: %[[VAL_42:.*]] = arith.mulf %[[VAL_39]], %[[VAL_41]] fastmath : f64 ! CHECK: hlfir.assign %[[VAL_42]] to %[[VAL_27]]#0 : f64, !fir.ref ! CHECK: omp.yield -! CHECK: omp.terminator ! CHECK: omp.terminator ! CHECK: return diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-multi.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-multi.f90 index 1ca8cdc622ea9..659ba06005670 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-multi.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-multi.f90 @@ -61,7 +61,6 @@ !CHECK: hlfir.assign %[[RES_Z]] to %[[PRV_Z_DECL]]#0 : i32, !fir.ref !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !CHECK: return subroutine multiple_reduction(v) diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90 index 746229b8699f3..5b6ab095b45b6 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90 @@ -154,7 +154,6 @@ program main ! CHECK: hlfir.assign %[[VAL_44]] to %[[VAL_48]] : f64, !fir.ref ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-pointer.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-pointer.f90 index 8d4aa8cd83038..2c126bb8962c2 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-pointer.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-pointer.f90 @@ -106,7 +106,6 @@ program reduce_pointer ! CHECK: hlfir.assign %[[VAL_30]] to %[[VAL_32]] : i32, !fir.ptr ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-schedule.f90 b/flang/test/Lower/OpenMP/wsloop-schedule.f90 index de0a2dae6b587..ae854a2de0c9d 100644 --- a/flang/test/Lower/OpenMP/wsloop-schedule.f90 +++ b/flang/test/Lower/OpenMP/wsloop-schedule.f90 @@ -27,7 +27,6 @@ program wsloop_dynamic end do !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !CHECK: omp.terminator !CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-unstructured.f90 b/flang/test/Lower/OpenMP/wsloop-unstructured.f90 index bd6a0bade8c7e..8c89f863ab877 100644 --- a/flang/test/Lower/OpenMP/wsloop-unstructured.f90 +++ b/flang/test/Lower/OpenMP/wsloop-unstructured.f90 @@ -54,7 +54,6 @@ end subroutine sub ! CHECK: ^bb7: ! CHECK: omp.yield ! CHECK: } -! CHECK: omp.terminator ! CHECK: } ! CHECK: omp.terminator ! CHECK: } diff --git a/flang/test/Lower/OpenMP/wsloop-variable.f90 b/flang/test/Lower/OpenMP/wsloop-variable.f90 index 7bfb9274f389a..8d235c10fa1d6 100644 --- a/flang/test/Lower/OpenMP/wsloop-variable.f90 +++ b/flang/test/Lower/OpenMP/wsloop-variable.f90 @@ -35,7 +35,6 @@ program wsloop_variable !CHECK: hlfir.assign %[[TMP11]] to %{{.*}} : f32, !fir.ref !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !$omp do collapse(2) @@ -58,7 +57,6 @@ program wsloop_variable !CHECK: hlfir.assign %[[TMP16]] to %{{.*}} : f32, !fir.ref !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !$omp do @@ -79,7 +77,6 @@ program wsloop_variable !CHECK: hlfir.assign %[[TMP21]] to %{{.*}} : f32, !fir.ref !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !$omp do @@ -162,7 +159,6 @@ subroutine wsloop_variable_sub !CHECK: fir.store %[[VAL_48:.*]]#1 to %[[VAL_17]]#1 : !fir.ref !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } !$omp do @@ -193,7 +189,6 @@ subroutine wsloop_variable_sub !CHECK: } !CHECK: omp.yield !CHECK: } -!CHECK: omp.terminator !CHECK: } j1 = 5 !$omp do diff --git a/flang/test/Lower/OpenMP/wsloop.f90 b/flang/test/Lower/OpenMP/wsloop.f90 index 6566b3cbd6d4d..4378233a622ed 100644 --- a/flang/test/Lower/OpenMP/wsloop.f90 +++ b/flang/test/Lower/OpenMP/wsloop.f90 @@ -22,7 +22,6 @@ subroutine simple_loop print*, i end do ! CHECK: omp.yield - ! CHECK: omp.terminator !$OMP END DO ! CHECK: omp.terminator !$OMP END PARALLEL @@ -48,7 +47,6 @@ subroutine simple_loop_with_step print*, i end do ! CHECK: omp.yield - ! CHECK: omp.terminator !$OMP END DO ! CHECK: omp.terminator !$OMP END PARALLEL @@ -74,7 +72,6 @@ subroutine loop_with_schedule_nowait print*, i end do ! CHECK: omp.yield - ! CHECK: omp.terminator !$OMP END DO NOWAIT ! CHECK: omp.terminator !$OMP END PARALLEL diff --git a/mlir/docs/Dialects/OpenMPDialect/_index.md b/mlir/docs/Dialects/OpenMPDialect/_index.md index b4e359284edae..3d28fe7819129 100644 --- a/mlir/docs/Dialects/OpenMPDialect/_index.md +++ b/mlir/docs/Dialects/OpenMPDialect/_index.md @@ -362,9 +362,10 @@ of accessing clause-defined block arguments. Loop-associated OpenMP constructs are represented in the dialect as loop wrapper operations. These implement the `LoopWrapperInterface`, which enforces a series of restrictions upon the operation: - - It contains a single region with a single block; and - - Its block contains exactly two operations: another loop wrapper or -`omp.loop_nest` operation and a terminator. + - It has the `NoTerminator` and `SingleBlock` traits; + - It contains a single region; and + - Its only block contains exactly one operation, which must be another loop +wrapper or `omp.loop_nest` operation. This approach splits the representation for a loop nest and the loop-associated constructs that specify how its iterations are executed, possibly across various @@ -393,7 +394,6 @@ omp.parallel ... { store %sum, %c[%i] : memref omp.yield } - omp.terminator } ... omp.terminator @@ -490,9 +490,7 @@ omp.distribute ... { ... omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} ``` @@ -518,9 +516,7 @@ omp.parallel ... { ... omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} ... omp.terminator diff --git a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td index 66f63fc02fe2f..dd21afec6eb45 100644 --- a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td +++ b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td @@ -364,9 +364,8 @@ def LoopNestOp : OpenMP_Op<"loop_nest", traits = [ //===----------------------------------------------------------------------===// def WsloopOp : OpenMP_Op<"wsloop", traits = [ - AttrSizedOperandSegments, - DeclareOpInterfaceMethods, - DeclareOpInterfaceMethods, + AttrSizedOperandSegments, DeclareOpInterfaceMethods, + DeclareOpInterfaceMethods, NoTerminator, RecursiveMemoryEffects, SingleBlock ], clauses = [ OpenMP_AllocateClause, OpenMP_LinearClause, OpenMP_NowaitClause, @@ -381,8 +380,8 @@ def WsloopOp : OpenMP_Op<"wsloop", traits = [ parallel region. The body region can only contain a single block which must contain a single - operation and a terminator. The operation must be another compatible loop - wrapper or an `omp.loop_nest`. + operation. This operation must be another compatible loop wrapper or an + `omp.loop_nest`. ``` omp.wsloop { @@ -393,7 +392,6 @@ def WsloopOp : OpenMP_Op<"wsloop", traits = [ store %sum, %arrC[%i1, %i2] : memref omp.yield } - omp.terminator } ``` }] # clausesDescription; @@ -417,9 +415,8 @@ def WsloopOp : OpenMP_Op<"wsloop", traits = [ //===----------------------------------------------------------------------===// def SimdOp : OpenMP_Op<"simd", traits = [ - AttrSizedOperandSegments, - DeclareOpInterfaceMethods, - DeclareOpInterfaceMethods, + AttrSizedOperandSegments, DeclareOpInterfaceMethods, + DeclareOpInterfaceMethods, NoTerminator, RecursiveMemoryEffects, SingleBlock ], clauses = [ OpenMP_AlignedClause, OpenMP_IfClause, OpenMP_LinearClause, @@ -433,8 +430,8 @@ def SimdOp : OpenMP_Op<"simd", traits = [ be executed concurrently using SIMD instructions). The body region can only contain a single block which must contain a single - operation and a terminator. The operation must be another compatible loop - wrapper or an `omp.loop_nest`. + operation. This operation must be another compatible loop wrapper or an + `omp.loop_nest`. ``` omp.simd { @@ -445,7 +442,6 @@ def SimdOp : OpenMP_Op<"simd", traits = [ store %sum, %arrC[%i1, %i2] : memref omp.yield } - omp.terminator } ``` @@ -492,9 +488,8 @@ def YieldOp : OpenMP_Op<"yield", // Distribute construct [2.9.4.1] //===----------------------------------------------------------------------===// def DistributeOp : OpenMP_Op<"distribute", traits = [ - AttrSizedOperandSegments, - DeclareOpInterfaceMethods, - DeclareOpInterfaceMethods, + AttrSizedOperandSegments, DeclareOpInterfaceMethods, + DeclareOpInterfaceMethods, NoTerminator, RecursiveMemoryEffects, SingleBlock ], clauses = [ OpenMP_AllocateClause, OpenMP_DistScheduleClause, OpenMP_OrderClause, @@ -517,8 +512,8 @@ def DistributeOp : OpenMP_Op<"distribute", traits = [ region. The body region can only contain a single block which must contain a single - operation and a terminator. The operation must be another compatible loop - wrapper or an `omp.loop_nest`. + operation. This operation must be another compatible loop wrapper or an + `omp.loop_nest`. ```mlir omp.distribute { @@ -529,7 +524,6 @@ def DistributeOp : OpenMP_Op<"distribute", traits = [ store %sum, %arrC[%i1, %i2] : memref omp.yield } - omp.terminator } ``` }] # clausesDescription; @@ -595,7 +589,7 @@ def TaskOp : OpenMP_Op<"task", traits = [ def TaskloopOp : OpenMP_Op<"taskloop", traits = [ AttrSizedOperandSegments, AutomaticAllocationScope, DeclareOpInterfaceMethods, - DeclareOpInterfaceMethods, + DeclareOpInterfaceMethods, NoTerminator, RecursiveMemoryEffects, SingleBlock ], clauses = [ OpenMP_AllocateClause, OpenMP_FinalClause, OpenMP_GrainsizeClause, @@ -613,8 +607,8 @@ def TaskloopOp : OpenMP_Op<"taskloop", traits = [ scheduled to be executed. The body region can only contain a single block which must contain a single - operation and a terminator. The operation must be another compatible loop - wrapper or an `omp.loop_nest`. + operation. This operation must be another compatible loop wrapper or an + `omp.loop_nest`. ``` omp.taskloop { @@ -625,7 +619,6 @@ def TaskloopOp : OpenMP_Op<"taskloop", traits = [ store %sum, %arrC[%i1, %i2] : memref omp.yield } - omp.terminator } ``` diff --git a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp index 6d250237e0a33..aa241b91d758c 100644 --- a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp +++ b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp @@ -488,9 +488,6 @@ struct ParallelOpLowering : public OpRewritePattern { llvm::SmallVector(reductionVariables.size(), parallelOp.getLoc())); - rewriter.setInsertionPoint( - rewriter.create(parallelOp.getLoc())); - // Create loop nest and populate region with contents of scf.parallel. auto loopOp = rewriter.create( parallelOp.getLoc(), parallelOp.getLowerBound(), diff --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp index f87a46a7e5995..c6c6edb8f999f 100644 --- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp +++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp @@ -1924,27 +1924,23 @@ LogicalResult SingleOp::verify() { LogicalResult LoopWrapperInterface::verifyImpl() { Operation *op = this->getOperation(); + if (!op->hasTrait() || + !op->hasTrait()) + return emitOpError() << "loop wrapper must also have the `NoTerminator` " + "and `SingleBlock` traits"; + if (op->getNumRegions() != 1) - return emitOpError() << "loop wrapper contains multiple regions"; + return emitOpError() << "loop wrapper does not contain exactly one region"; Region ®ion = op->getRegion(0); - if (!region.hasOneBlock()) - return emitOpError() << "loop wrapper contains multiple blocks"; - - if (::llvm::range_size(region.getOps()) != 2) + if (range_size(region.getOps()) != 1) return emitOpError() - << "loop wrapper does not contain exactly two nested ops"; + << "loop wrapper does not contain exactly one nested op"; Operation &firstOp = *region.op_begin(); - Operation &secondOp = *(std::next(region.op_begin())); - - if (!secondOp.hasTrait()) - return emitOpError() - << "second nested op in loop wrapper is not a terminator"; - - if (!::llvm::isa(firstOp)) - return emitOpError() << "first nested op in loop wrapper is not " - "another loop wrapper or `omp.loop_nest`"; + if (!isa(firstOp)) + return emitOpError() << "op nested in loop wrapper is not another loop " + "wrapper or `omp.loop_nest`"; return success(); } diff --git a/mlir/test/CAPI/execution_engine.c b/mlir/test/CAPI/execution_engine.c index 81ff8477ffd7b..18120c6ec8028 100644 --- a/mlir/test/CAPI/execution_engine.c +++ b/mlir/test/CAPI/execution_engine.c @@ -103,7 +103,6 @@ void testOmpCreation(void) { " omp.loop_nest (%3) : i32 = (%0) to (%2) step (%1) { \n" " omp.yield \n" " } \n" -" omp.terminator \n" " } \n" " omp.terminator \n" " } \n" diff --git a/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir b/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir index d914eb940e791..e496c66f86522 100644 --- a/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir +++ b/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir @@ -96,7 +96,6 @@ func.func @wsloop(%arg0: index, %arg1: index, %arg2: index, %arg3: index, %arg4: "test.payload"(%arg6, %arg7) : (index, index) -> () omp.yield } - omp.terminator }) : () -> () omp.terminator } @@ -189,7 +188,6 @@ func.func @loop_nest_block_arg(%val : i32, %ub : i32, %i : index) { ^bb3: omp.yield } - omp.terminator } return } @@ -347,7 +345,6 @@ llvm.func @_QPsb() { // CHECK: %[[ZEXT:.+]] = llvm.zext %[[CMP]] : i1 to i32 // CHECK: llvm.store %[[ZEXT]], %[[PRV]] : i32, !llvm.ptr // CHECK: omp.yield -// CHECK: omp.terminator // CHECK: omp.terminator // CHECK: llvm.return @@ -389,7 +386,6 @@ llvm.func @_QPsimple_reduction(%arg0: !llvm.ptr {fir.bindc_name = "y"}) { llvm.store %14, %prv : i32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -559,7 +555,6 @@ func.func @omp_distribute(%arg0 : index) -> () { omp.loop_nest (%iv) : index = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } return } @@ -587,7 +582,6 @@ func.func @omp_ordered(%arg0 : index) -> () { omp.ordered depend_vec(%arg0 : index) {doacross_num_loops = 1 : i64} omp.yield } - omp.terminator } return } @@ -608,7 +602,6 @@ func.func @omp_taskloop(%arg0: index, %arg1 : memref) { "test.payload"(%iv) : (index) -> () omp.yield } - omp.terminator } omp.terminator } diff --git a/mlir/test/Conversion/SCFToOpenMP/reductions.mlir b/mlir/test/Conversion/SCFToOpenMP/reductions.mlir index fc6d56559c261..8e2343df48877 100644 --- a/mlir/test/Conversion/SCFToOpenMP/reductions.mlir +++ b/mlir/test/Conversion/SCFToOpenMP/reductions.mlir @@ -44,7 +44,6 @@ func.func @reduction1(%arg0 : index, %arg1 : index, %arg2 : index, } // CHECK: omp.yield } - // CHECK: omp.terminator // CHECK: omp.terminator // CHECK: llvm.load %[[BUF]] return @@ -240,7 +239,6 @@ func.func @reduction4(%arg0 : index, %arg1 : index, %arg2 : index, } // CHECK: omp.yield } - // CHECK: omp.terminator // CHECK: omp.terminator // CHECK: %[[RES1:.*]] = llvm.load %[[BUF1]] : !llvm.ptr -> f32 // CHECK: %[[RES2:.*]] = llvm.load %[[BUF2]] : !llvm.ptr -> i64 diff --git a/mlir/test/Conversion/SCFToOpenMP/scf-to-openmp.mlir b/mlir/test/Conversion/SCFToOpenMP/scf-to-openmp.mlir index b2f19d294cb5f..a722acbf2c347 100644 --- a/mlir/test/Conversion/SCFToOpenMP/scf-to-openmp.mlir +++ b/mlir/test/Conversion/SCFToOpenMP/scf-to-openmp.mlir @@ -14,7 +14,6 @@ func.func @parallel(%arg0: index, %arg1: index, %arg2: index, // CHECK: omp.yield // CHECK: } } - // CHECK: omp.terminator // CHECK: } // CHECK: omp.terminator // CHECK: } @@ -41,10 +40,8 @@ func.func @nested_loops(%arg0: index, %arg1: index, %arg2: index, } // CHECK: omp.yield // CHECK: } - // CHECK: omp.terminator // CHECK: } } - // CHECK: omp.terminator // CHECK: } // CHECK: omp.terminator // CHECK: } @@ -65,7 +62,6 @@ func.func @adjacent_loops(%arg0: index, %arg1: index, %arg2: index, // CHECK: omp.yield // CHECK: } } - // CHECK: omp.terminator // CHECK: } // CHECK: omp.terminator // CHECK: } @@ -81,7 +77,6 @@ func.func @adjacent_loops(%arg0: index, %arg1: index, %arg2: index, // CHECK: omp.yield // CHECK: } } - // CHECK: omp.terminator // CHECK: } // CHECK: omp.terminator // CHECK: } diff --git a/mlir/test/Dialect/LLVMIR/legalize-for-export.mlir b/mlir/test/Dialect/LLVMIR/legalize-for-export.mlir index b1b06740f1944..7b4557d47bde2 100644 --- a/mlir/test/Dialect/LLVMIR/legalize-for-export.mlir +++ b/mlir/test/Dialect/LLVMIR/legalize-for-export.mlir @@ -42,7 +42,6 @@ llvm.func @repeated_successor_openmp(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: // CHECK: ^[[BB2]](%[[ARG:.*]]: i64): // CHECK: llvm.br ^[[BB1]](%[[ARG]] : i64) } - omp.terminator } llvm.return } diff --git a/mlir/test/Dialect/OpenMP/invalid.mlir b/mlir/test/Dialect/OpenMP/invalid.mlir index a780efe6d22e1..f7a87713aca35 100644 --- a/mlir/test/Dialect/OpenMP/invalid.mlir +++ b/mlir/test/Dialect/OpenMP/invalid.mlir @@ -103,7 +103,6 @@ func.func @type_mismatch(%lb : index, %ub : index, %step : index) { ^bb0(%iv2: i32): omp.yield }) : (index, index, index) -> () - omp.terminator } } @@ -116,20 +115,18 @@ func.func @iv_number_mismatch(%lb : index, %ub : index, %step : index) { ^bb0(%iv1 : index, %iv2 : index): omp.yield }) : (index, index, index) -> () - omp.terminator } } // ----- func.func @no_wrapper(%lb : index, %ub : index, %step : index) { - // expected-error @below {{op loop wrapper does not contain exactly two nested ops}} + // expected-error @below {{op loop wrapper does not contain exactly one nested op}} omp.wsloop { %0 = arith.constant 0 : i32 omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } } @@ -142,9 +139,7 @@ func.func @invalid_nested_wrapper(%lb : index, %ub : index, %step : index) { omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} } @@ -157,7 +152,6 @@ func.func @no_loops(%lb : index, %ub : index, %step : index) { ^bb0(): omp.yield }) : () -> () - omp.terminator } } @@ -169,7 +163,6 @@ func.func @inclusive_not_a_clause(%lb : index, %ub : index, %step : index) { omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } } @@ -181,7 +174,6 @@ func.func @order_value(%lb : index, %ub : index, %step : index) { omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } } @@ -192,7 +184,6 @@ func.func @reproducible_order(%lb : index, %ub : index, %step : index) { omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } } // ----- @@ -202,7 +193,6 @@ func.func @unconstrained_order(%lb : index, %ub : index, %step : index) { omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } } // ----- @@ -213,7 +203,6 @@ func.func @if_not_allowed(%lb : index, %ub : index, %step : index, %bool_var : i omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } } @@ -225,7 +214,6 @@ func.func @num_threads_not_allowed(%lb : index, %ub : index, %step : index, %int omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } } @@ -237,7 +225,6 @@ func.func @proc_bind_not_allowed(%lb : index, %ub : index, %step : index) { omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } } @@ -249,7 +236,6 @@ llvm.func @test_omp_wsloop_dynamic_bad_modifier(%lb : i64, %ub : i64, %step : i6 omp.loop_nest (%iv) : i64 = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } llvm.return } @@ -262,7 +248,6 @@ llvm.func @test_omp_wsloop_dynamic_many_modifier(%lb : i64, %ub : i64, %step : i omp.loop_nest (%iv) : i64 = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } llvm.return } @@ -275,7 +260,6 @@ llvm.func @test_omp_wsloop_dynamic_wrong_modifier(%lb : i64, %ub : i64, %step : omp.loop_nest (%iv) : i64 = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } llvm.return } @@ -288,7 +272,6 @@ llvm.func @test_omp_wsloop_dynamic_wrong_modifier2(%lb : i64, %ub : i64, %step : omp.loop_nest (%iv) : i64 = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } llvm.return } @@ -301,7 +284,6 @@ llvm.func @test_omp_wsloop_dynamic_wrong_modifier3(%lb : i64, %ub : i64, %step : omp.loop_nest (%iv) : i64 = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } llvm.return } @@ -309,10 +291,8 @@ llvm.func @test_omp_wsloop_dynamic_wrong_modifier3(%lb : i64, %ub : i64, %step : // ----- func.func @omp_simd() -> () { - // expected-error @below {{op loop wrapper does not contain exactly two nested ops}} - omp.simd { - omp.terminator - } + // expected-error @below {{op loop wrapper does not contain exactly one nested op}} + omp.simd {} return } @@ -325,9 +305,7 @@ func.func @omp_simd_nested_wrapper(%lb : index, %ub : index, %step : index) -> ( omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } - omp.terminator } return } @@ -355,7 +333,6 @@ func.func @omp_simd_aligned_mismatch(%arg0 : index, %arg1 : index, omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator }) {alignments = [128], operandSegmentSizes = array} : (memref, memref) -> () return @@ -371,7 +348,6 @@ func.func @omp_simd_aligned_negative(%arg0 : index, %arg1 : index, omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator }) {alignments = [-1, 128], operandSegmentSizes = array} : (memref, memref) -> () return } @@ -386,7 +362,6 @@ func.func @omp_simd_unexpected_alignment(%arg0 : index, %arg1 : index, omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator }) {alignments = [1, 128]} : () -> () return } @@ -401,7 +376,6 @@ func.func @omp_simd_aligned_float(%arg0 : index, %arg1 : index, omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator }) {alignments = [1.5, 128], operandSegmentSizes = array} : (memref, memref) -> () return } @@ -416,7 +390,6 @@ func.func @omp_simd_aligned_the_same_var(%arg0 : index, %arg1 : index, omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator }) {alignments = [1, 128], operandSegmentSizes = array} : (memref, memref) -> () return } @@ -431,7 +404,6 @@ func.func @omp_simd_nontemporal_the_same_var(%arg0 : index, %arg1 : index, omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator }) {operandSegmentSizes = array} : (memref, memref) -> () return } @@ -444,7 +416,6 @@ func.func @omp_simd_order_value(%lb : index, %ub : index, %step : index) { omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator } return } @@ -457,7 +428,6 @@ func.func @omp_simd_reproducible_order(%lb : index, %ub : index, %step : index) omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator } return } @@ -468,7 +438,6 @@ func.func @omp_simd_unconstrained_order(%lb : index, %ub : index, %step : index) omp.loop_nest (%iv) : index = (%arg0) to (%arg1) step (%arg2) { omp.yield } - omp.terminator } return } @@ -479,7 +448,6 @@ func.func @omp_simd_pretty_simdlen(%lb : index, %ub : index, %step : index) -> ( omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -492,7 +460,6 @@ func.func @omp_simd_pretty_safelen(%lb : index, %ub : index, %step : index) -> ( omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -505,7 +472,6 @@ func.func @omp_simd_pretty_simdlen_safelen(%lb : index, %ub : index, %step : ind omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -724,7 +690,6 @@ func.func @foo(%lb : index, %ub : index, %step : index) { %2 = arith.constant 2.0 : f32 omp.yield } - omp.terminator } return } @@ -753,7 +718,6 @@ func.func @foo(%lb : index, %ub : index, %step : index) { %2 = arith.constant 2.0 : f32 omp.yield } - omp.terminator } return } @@ -787,7 +751,6 @@ func.func @foo(%lb : index, %ub : index, %step : index, %mem : memref<1xf32>) { %2 = arith.constant 2.0 : f32 omp.yield } - omp.terminator } return } @@ -828,7 +791,6 @@ func.func @omp_ordered_region1(%x : i32) -> () { } omp.yield } - omp.terminator } return } @@ -844,7 +806,6 @@ func.func @omp_ordered_region2(%x : i32) -> () { } omp.yield } - omp.terminator } return } @@ -860,7 +821,6 @@ func.func @omp_ordered_region3(%x : i32) -> () { } omp.yield } - omp.terminator } return } @@ -882,7 +842,6 @@ func.func @omp_ordered2(%arg1 : i32, %arg2 : i32, %arg3 : i32, %vec0 : i64) -> ( omp.ordered depend_type(dependsink) depend_vec(%vec0 : i64) {doacross_num_loops = 1 : i64} omp.yield } - omp.terminator } return } @@ -896,7 +855,6 @@ func.func @omp_ordered3(%arg1 : i32, %arg2 : i32, %arg3 : i32, %vec0 : i64) -> ( omp.ordered depend_type(dependsink) depend_vec(%vec0 : i64) {doacross_num_loops = 1 : i64} omp.yield } - omp.terminator } return } @@ -910,7 +868,6 @@ func.func @omp_ordered4(%arg1 : i32, %arg2 : i32, %arg3 : i32, %vec0 : i64) -> ( omp.ordered depend_type(dependsink) depend_vec(%vec0 : i64) {doacross_num_loops = 1 : i64} omp.yield } - omp.terminator } return } @@ -924,7 +881,6 @@ func.func @omp_ordered5(%arg1 : i32, %arg2 : i32, %arg3 : i32, %vec0 : i64, %vec omp.ordered depend_type(dependsource) depend_vec(%vec0, %vec1 : i64, i64) {doacross_num_loops = 2 : i64} omp.yield } - omp.terminator } return } @@ -1796,7 +1752,6 @@ func.func @omp_cancel3(%arg1 : i32, %arg2 : i32, %arg3 : i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } return } @@ -1811,7 +1766,6 @@ func.func @omp_cancel4(%arg1 : i32, %arg2 : i32, %arg3 : i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } return } @@ -1876,7 +1830,6 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%i, %j) : i32 = (%lb, %ub) to (%ub, %lb) step (%step, %step) { omp.yield } - omp.terminator }) {operandSegmentSizes = array} : (memref) -> () return } @@ -1892,7 +1845,6 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%i, %j) : i32 = (%lb, %ub) to (%ub, %lb) step (%step, %step) { omp.yield } - omp.terminator }) {operandSegmentSizes = array, reduction_syms = [@add_f32]} : (!llvm.ptr, !llvm.ptr) -> () return } @@ -1907,7 +1859,6 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%i, %j) : i32 = (%lb, %ub) to (%ub, %lb) step (%step, %step) { omp.yield } - omp.terminator }) {operandSegmentSizes = array, reduction_syms = [@add_f32, @add_f32]} : (!llvm.ptr) -> () return } @@ -1923,7 +1874,6 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%i, %j) : i32 = (%lb, %ub) to (%ub, %lb) step (%step, %step) { omp.yield } - omp.terminator }) {in_reduction_syms = [@add_f32], operandSegmentSizes = array} : (!llvm.ptr, !llvm.ptr) -> () return } @@ -1938,7 +1888,6 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%i, %j) : i32 = (%lb, %ub) to (%ub, %lb) step (%step, %step) { omp.yield } - omp.terminator }) {in_reduction_syms = [@add_f32, @add_f32], operandSegmentSizes = array} : (!llvm.ptr) -> () return } @@ -1965,7 +1914,6 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%i, %j) : i32 = (%lb, %ub) to (%ub, %lb) step (%step, %step) { omp.yield } - omp.terminator } return } @@ -1991,7 +1939,6 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%i, %j) : i32 = (%lb, %ub) to (%ub, %lb) step (%step, %step) { omp.yield } - omp.terminator } return } @@ -2005,7 +1952,6 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%i, %j) : i32 = (%lb, %ub) to (%ub, %lb) step (%step, %step) { omp.yield } - omp.terminator } return } @@ -2013,10 +1959,9 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { // ----- func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { - // expected-error @below {{op first nested op in loop wrapper is not another loop wrapper or `omp.loop_nest`}} + // expected-error @below {{op nested in loop wrapper is not another loop wrapper or `omp.loop_nest`}} omp.taskloop { %0 = arith.constant 0 : i32 - omp.terminator } return } @@ -2030,9 +1975,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) { omp.loop_nest (%iv) : i32 = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} return } @@ -2209,7 +2152,6 @@ func.func @omp_distribute_schedule(%chunk_size : i32, %lb : i32, %ub : i32, %ste omp.loop_nest (%iv) : i32 = (%lb) to (%ub) step (%step) { "omp.yield"() : () -> () } - "omp.terminator"() : () -> () }) : (i32) -> () } @@ -2221,24 +2163,11 @@ func.func @omp_distribute_allocate(%data_var : memref, %lb : i32, %ub : i32 omp.loop_nest (%iv) : i32 = (%lb) to (%ub) step (%step) { "omp.yield"() : () -> () } - "omp.terminator"() : () -> () }) : (memref) -> () } // ----- -func.func @omp_distribute_wrapper(%lb: index, %ub: index, %step: index) -> () { - // expected-error @below {{op second nested op in loop wrapper is not a terminator}} - omp.distribute { - omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { - "omp.yield"() : () -> () - } - %0 = arith.constant 0 : i32 - } -} - -// ----- - func.func @omp_distribute_nested_wrapper(%lb: index, %ub: index, %step: index) -> () { // expected-error @below {{an 'omp.wsloop' nested wrapper is only allowed when 'omp.parallel' is the direct parent}} omp.distribute { @@ -2246,9 +2175,7 @@ func.func @omp_distribute_nested_wrapper(%lb: index, %ub: index, %step: index) - omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { "omp.yield"() : () -> () } - "omp.terminator"() : () -> () }) {omp.composite} : () -> () - "omp.terminator"() : () -> () } {omp.composite} } @@ -2261,9 +2188,7 @@ func.func @omp_distribute_nested_wrapper2(%lb: index, %ub: index, %step: index) omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { "omp.yield"() : () -> () } - "omp.terminator"() : () -> () }) {omp.composite} : () -> () - "omp.terminator"() : () -> () } {omp.composite} } @@ -2276,9 +2201,7 @@ func.func @omp_distribute_nested_wrapper3(%lb: index, %ub: index, %step: index) omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { "omp.yield"() : () -> () } - "omp.terminator"() : () -> () }) {omp.composite} : () -> () - "omp.terminator"() : () -> () } } @@ -2500,9 +2423,7 @@ func.func @omp_parallel_missing_composite(%lb: index, %ub: index, %step: index) omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} omp.terminator } @@ -2517,7 +2438,6 @@ func.func @omp_parallel_invalid_composite(%lb: index, %ub: index, %step: index) omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } omp.terminator } {omp.composite} @@ -2534,9 +2454,7 @@ func.func @omp_parallel_invalid_composite2(%lb: index, %ub: index, %step: index) omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} omp.terminator } {omp.composite} @@ -2551,9 +2469,7 @@ func.func @omp_wsloop_missing_composite(%lb: index, %ub: index, %step: index) -> omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } return } @@ -2565,7 +2481,6 @@ func.func @omp_wsloop_invalid_composite(%lb: index, %ub: index, %step: index) -> omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} return } @@ -2579,9 +2494,7 @@ func.func @omp_wsloop_missing_composite_2(%lb: index, %ub: index, %step: index) omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } - omp.terminator } {omp.composite} omp.terminator } {omp.composite} @@ -2596,9 +2509,7 @@ func.func @omp_simd_missing_composite(%lb: index, %ub: index, %step: index) -> ( omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } - omp.terminator } {omp.composite} return } @@ -2610,7 +2521,6 @@ func.func @omp_simd_invalid_composite(%lb: index, %ub: index, %step: index) -> ( omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} return } @@ -2624,9 +2534,7 @@ func.func @omp_distribute_missing_composite(%lb: index, %ub: index, %step: index omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } omp.terminator } {omp.composite} @@ -2640,7 +2548,6 @@ func.func @omp_distribute_invalid_composite(%lb: index, %ub: index, %step: index omp.loop_nest (%0) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} return } @@ -2653,9 +2560,7 @@ func.func @omp_taskloop_missing_composite(%lb: index, %ub: index, %step: index) omp.loop_nest (%i) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } return } @@ -2667,7 +2572,6 @@ func.func @omp_taskloop_invalid_composite(%lb: index, %ub: index, %step: index) omp.loop_nest (%i) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} return } diff --git a/mlir/test/Dialect/OpenMP/ops.mlir b/mlir/test/Dialect/OpenMP/ops.mlir index a4423782a723b..6f11b451fa00a 100644 --- a/mlir/test/Dialect/OpenMP/ops.mlir +++ b/mlir/test/Dialect/OpenMP/ops.mlir @@ -110,9 +110,7 @@ func.func @omp_parallel(%data_var : memref, %if_cond : i1, %num_threads : i omp.loop_nest (%iv) : index = (%idx) to (%idx) step (%idx) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} omp.terminator } {omp.composite} @@ -130,11 +128,8 @@ func.func @omp_parallel(%data_var : memref, %if_cond : i1, %num_threads : i omp.loop_nest (%iv) : index = (%idx) to (%idx) step (%idx) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} omp.terminator } {omp.composite} @@ -197,7 +192,6 @@ func.func @omp_loop_nest(%lb : index, %ub : index, %step : index) -> () { ^bb0(%iv: index): omp.yield }) : (index, index, index) -> () - omp.terminator } omp.wsloop { @@ -208,7 +202,6 @@ func.func @omp_loop_nest(%lb : index, %ub : index, %step : index) -> () { ^bb0(%iv: index): omp.yield }) {loop_inclusive} : (index, index, index) -> () - omp.terminator } omp.wsloop { @@ -219,7 +212,6 @@ func.func @omp_loop_nest(%lb : index, %ub : index, %step : index) -> () { ^bb0(%iv: index, %iv3: index): omp.yield }) : (index, index, index, index, index, index) -> () - omp.terminator } omp.wsloop { @@ -235,7 +227,6 @@ func.func @omp_loop_nest(%lb : index, %ub : index, %step : index) -> () { // CHECK: omp.yield omp.yield }) : (index, index, index) -> () - omp.terminator } return @@ -250,7 +241,6 @@ func.func @omp_loop_nest_pretty(%lb : index, %ub : index, %step : index) -> () { omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } omp.wsloop { @@ -260,7 +250,6 @@ func.func @omp_loop_nest_pretty(%lb : index, %ub : index, %step : index) -> () { omp.loop_nest (%iv) : index = (%lb) to (%ub) inclusive step (%step) { omp.yield } - omp.terminator } omp.wsloop { @@ -270,7 +259,6 @@ func.func @omp_loop_nest_pretty(%lb : index, %ub : index, %step : index) -> () { omp.loop_nest (%iv1, %iv2) : index = (%lb, %lb) to (%ub, %ub) step (%step, %step) { omp.yield } - omp.terminator } omp.wsloop { @@ -285,7 +273,6 @@ func.func @omp_loop_nest_pretty(%lb : index, %ub : index, %step : index) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } return @@ -304,7 +291,6 @@ func.func @omp_loop_nest_pretty_multi_block(%lb : index, %ub : index, memref.store %arg, %data1[%iv] : memref omp.yield } - omp.terminator } omp.wsloop { @@ -322,7 +308,6 @@ func.func @omp_loop_nest_pretty_multi_block(%lb : index, %ub : index, ^bb3: omp.yield } - omp.terminator } omp.wsloop { @@ -338,7 +323,6 @@ func.func @omp_loop_nest_pretty_multi_block(%lb : index, %ub : index, memref.store %arg1, %data2[%iv] : memref omp.yield } - omp.terminator } return @@ -358,7 +342,6 @@ func.func @omp_loop_nest_pretty_non_index(%lb1 : i32, %ub1 : i32, %step1 : i32, memref.store %iv1, %data1[%arg1] : memref omp.yield } - omp.terminator } omp.wsloop { @@ -370,7 +353,6 @@ func.func @omp_loop_nest_pretty_non_index(%lb1 : i32, %ub1 : i32, %step1 : i32, memref.store %iv, %data2[%arg2] : memref omp.yield } - omp.terminator } return @@ -389,7 +371,6 @@ func.func @omp_loop_nest_pretty_multiple(%lb1 : i32, %ub1 : i32, %step1 : i32, memref.store %iv2, %data1[%2] : memref omp.yield } - omp.terminator } return @@ -404,7 +385,6 @@ func.func @omp_wsloop(%lb : index, %ub : index, %step : index, %data_var : memre omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator }) {operandSegmentSizes = array, ordered = 1} : () -> () @@ -414,7 +394,6 @@ func.func @omp_wsloop(%lb : index, %ub : index, %step : index, %data_var : memre omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator }) {operandSegmentSizes = array, schedule_kind = #omp} : (memref, i32) -> () @@ -424,7 +403,6 @@ func.func @omp_wsloop(%lb : index, %ub : index, %step : index, %data_var : memre omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator }) {operandSegmentSizes = array, schedule_kind = #omp} : (memref, memref, i32, i32) -> () @@ -434,7 +412,6 @@ func.func @omp_wsloop(%lb : index, %ub : index, %step : index, %data_var : memre omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator }) {operandSegmentSizes = array, schedule_kind = #omp, ordered = 2} : (memref, i32, i32) -> () @@ -444,7 +421,6 @@ func.func @omp_wsloop(%lb : index, %ub : index, %step : index, %data_var : memre omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator }) {operandSegmentSizes = array, nowait, schedule_kind = #omp} : () -> () @@ -456,9 +432,7 @@ func.func @omp_wsloop(%lb : index, %ub : index, %step : index, %data_var : memre omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator }) {omp.composite} : () -> () return @@ -473,7 +447,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop linear(%{{.*}} = %{{.*}} : memref) schedule(static) { @@ -482,7 +455,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop linear(%{{.*}} = %{{.*}} : memref) ordered(2) schedule(static = %{{.*}} : i32) { @@ -491,7 +463,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop linear(%{{.*}} = %{{.*}} : memref) ordered(2) schedule(dynamic = %{{.*}} : i32, nonmonotonic) { @@ -500,7 +471,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop linear(%{{.*}} = %{{.*}} : memref) ordered(2) schedule(dynamic = %{{.*}} : i16, monotonic) { @@ -509,7 +479,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop { @@ -518,7 +487,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop nowait { @@ -527,7 +495,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop nowait order(concurrent) { @@ -536,7 +503,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop nowait order(reproducible:concurrent) { @@ -545,7 +511,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop nowait order(unconstrained:concurrent) { // CHECK-NEXT: omp.loop_nest @@ -553,7 +518,6 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.wsloop { // CHECK-NEXT: omp.simd @@ -563,9 +527,7 @@ func.func @omp_wsloop_pretty(%lb : index, %ub : index, %step : index, %data_var omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} return @@ -579,7 +541,6 @@ func.func @omp_simd(%lb : index, %ub : index, %step : index) -> () { ^bb1(%iv2: index): "omp.yield"() : () -> () }) : (index, index, index) -> () - "omp.terminator"() : () -> () } return @@ -596,7 +557,6 @@ func.func @omp_simd_aligned_list(%arg0 : index, %arg1 : index, %arg2 : index, ^bb1(%iv2: index): "omp.yield"() : () -> () }) : (index, index, index) -> () - "omp.terminator"() : () -> () }) {alignments = [32, 128], operandSegmentSizes = array} : (memref, memref) -> () return @@ -611,7 +571,6 @@ func.func @omp_simd_aligned_single(%arg0 : index, %arg1 : index, %arg2 : index, ^bb1(%iv2: index): "omp.yield"() : () -> () }) : (index, index, index) -> () - "omp.terminator"() : () -> () }) {alignments = [32], operandSegmentSizes = array} : (memref) -> () return @@ -627,7 +586,6 @@ func.func @omp_simd_nontemporal_list(%arg0 : index, %arg1 : index, ^bb1(%iv2: index): "omp.yield"() : () -> () }) : (index, index, index) -> () - "omp.terminator"() : () -> () }) {operandSegmentSizes = array} : (memref, memref) -> () return } @@ -642,7 +600,6 @@ func.func @omp_simd_nontemporal_single(%arg0 : index, %arg1 : index, ^bb1(%iv2: index): "omp.yield"() : () -> () }) : (index, index, index) -> () - "omp.terminator"() : () -> () }) {operandSegmentSizes = array} : (memref) -> () return } @@ -654,7 +611,6 @@ func.func @omp_simd_pretty(%lb : index, %ub : index, %step : index) -> () { omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -670,7 +626,6 @@ func.func @omp_simd_pretty_aligned(%lb : index, %ub : index, %step : index, omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -682,7 +637,6 @@ func.func @omp_simd_pretty_if(%lb : index, %ub : index, %step : index, %if_cond omp.loop_nest (%iv): index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -696,7 +650,6 @@ func.func @omp_simd_pretty_nontemporal(%lb : index, %ub : index, %step : index, omp.loop_nest (%iv) : index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -708,21 +661,18 @@ func.func @omp_simd_pretty_order(%lb : index, %ub : index, %step : index) -> () omp.loop_nest (%iv): index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.simd order(reproducible:concurrent) omp.simd order(reproducible:concurrent) { omp.loop_nest (%iv): index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } // CHECK: omp.simd order(unconstrained:concurrent) omp.simd order(unconstrained:concurrent) { omp.loop_nest (%iv): index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -734,7 +684,6 @@ func.func @omp_simd_pretty_simdlen(%lb : index, %ub : index, %step : index) -> ( omp.loop_nest (%iv): index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -746,7 +695,6 @@ func.func @omp_simd_pretty_safelen(%lb : index, %ub : index, %step : index) -> ( omp.loop_nest (%iv): index = (%lb) to (%ub) step (%step) { omp.yield } - omp.terminator } return } @@ -759,56 +707,48 @@ func.func @omp_distribute(%chunk_size : i32, %data_var : memref, %arg0 : i3 ^bb0(%iv: i32): "omp.yield"() : () -> () }) : (i32, i32, i32) -> () - "omp.terminator"() : () -> () }) {} : () -> () // CHECK: omp.distribute omp.distribute { omp.loop_nest (%iv) : i32 = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } // CHECK: omp.distribute dist_schedule_static omp.distribute dist_schedule_static { omp.loop_nest (%iv) : i32 = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } // CHECK: omp.distribute dist_schedule_static dist_schedule_chunk_size(%{{.+}} : i32) omp.distribute dist_schedule_static dist_schedule_chunk_size(%chunk_size : i32) { omp.loop_nest (%iv) : i32 = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } // CHECK: omp.distribute order(concurrent) omp.distribute order(concurrent) { omp.loop_nest (%iv) : i32 = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } // CHECK: omp.distribute order(reproducible:concurrent) omp.distribute order(reproducible:concurrent) { omp.loop_nest (%iv) : i32 = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } // CHECK: omp.distribute order(unconstrained:concurrent) omp.distribute order(unconstrained:concurrent) { omp.loop_nest (%iv) : i32 = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } // CHECK: omp.distribute allocate(%{{.+}} : memref -> %{{.+}} : memref) omp.distribute allocate(%data_var : memref -> %data_var : memref) { omp.loop_nest (%iv) : i32 = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } // CHECK: omp.distribute omp.distribute { @@ -816,9 +756,7 @@ func.func @omp_distribute(%chunk_size : i32, %data_var : memref, %arg0 : i3 omp.loop_nest (%iv) : i32 = (%arg0) to (%arg0) step (%arg0) { omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} return } @@ -958,7 +896,6 @@ func.func @wsloop_reduction(%lb : index, %ub : index, %step : index) { llvm.store %res, %prv : f32, !llvm.ptr omp.yield } - omp.terminator } return } @@ -980,7 +917,6 @@ func.func @wsloop_reduction_byref(%lb : index, %ub : index, %step : index) { llvm.store %res, %prv : f32, !llvm.ptr omp.yield } - omp.terminator } return } @@ -1034,8 +970,6 @@ func.func @parallel_wsloop_reduction(%lb : index, %ub : index, %step : index) { // CHECK: omp.yield omp.yield } - // CHECK: omp.terminator - omp.terminator } // CHECK: omp.terminator omp.terminator @@ -1197,7 +1131,6 @@ func.func @wsloop_reduction2(%lb : index, %ub : index, %step : index) { memref.store %4, %prv[%2] : memref<1xf32> omp.yield } - omp.terminator } return } @@ -1235,8 +1168,6 @@ func.func @parallel_wsloop_reduction2(%lb : index, %ub : index, %step : index) { // CHECK: omp.yield omp.yield } - // CHECK: omp.terminator - omp.terminator } // CHECK: omp.terminator omp.terminator @@ -1317,7 +1248,6 @@ func.func @omp_ordered(%arg1 : i32, %arg2 : i32, %arg3 : i32, } omp.yield } - omp.terminator } omp.wsloop ordered(1) { @@ -1331,7 +1261,6 @@ func.func @omp_ordered(%arg1 : i32, %arg2 : i32, %arg3 : i32, omp.yield } - omp.terminator } omp.wsloop ordered(2) { @@ -1345,7 +1274,6 @@ func.func @omp_ordered(%arg1 : i32, %arg2 : i32, %arg3 : i32, omp.yield } - omp.terminator } return @@ -2213,7 +2141,6 @@ func.func @omp_cancel_wsloop(%lb : index, %ub : index, %step : index) { // CHECK: omp.yield omp.yield } - omp.terminator } return } @@ -2252,7 +2179,6 @@ func.func @omp_cancellationpoint_wsloop(%lb : index, %ub : index, %step : index) // CHECK: omp.yield omp.yield } - omp.terminator } return } @@ -2340,7 +2266,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } %testbool = "test.bool"() : () -> (i1) @@ -2351,7 +2276,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // CHECK: omp.taskloop final(%{{[^)]+}}) { @@ -2360,7 +2284,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // CHECK: omp.taskloop untied { @@ -2369,7 +2292,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // CHECK: omp.taskloop mergeable { @@ -2378,7 +2300,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } %testf32 = "test.f32"() : () -> (!llvm.ptr) @@ -2389,7 +2310,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // Checking byref attribute for in_reduction @@ -2399,7 +2319,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // CHECK: omp.taskloop reduction(byref @add_f32 %{{.+}} -> %{{.+}}, @add_f32 %{{.+}} -> %{{.+}} : !llvm.ptr, !llvm.ptr) { @@ -2408,7 +2327,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // check byref attrbute for reduction @@ -2418,7 +2336,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // CHECK: omp.taskloop in_reduction(@add_f32 %{{.+}} -> %{{.+}} : !llvm.ptr) reduction(@add_f32 %{{.+}} -> %{{.+}} : !llvm.ptr) { @@ -2427,7 +2344,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } %testi32 = "test.i32"() : () -> (i32) @@ -2437,7 +2353,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } %testmemref = "test.memref"() : () -> (memref) @@ -2447,7 +2362,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } %testi64 = "test.i64"() : () -> (i64) @@ -2457,7 +2371,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // CHECK: omp.taskloop num_tasks(%{{[^:]+}}: i64) { @@ -2466,7 +2379,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // CHECK: omp.taskloop nogroup { @@ -2475,7 +2387,6 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } // CHECK: omp.taskloop { @@ -2485,9 +2396,7 @@ func.func @omp_taskloop(%lb: i32, %ub: i32, %step: i32) -> () { // CHECK: omp.yield omp.yield } - omp.terminator } {omp.composite} - omp.terminator } {omp.composite} // CHECK: return diff --git a/mlir/test/Target/LLVMIR/omptarget-parallel-wsloop.mlir b/mlir/test/Target/LLVMIR/omptarget-parallel-wsloop.mlir index 360b3b0c0e60c..649210795ff5c 100644 --- a/mlir/test/Target/LLVMIR/omptarget-parallel-wsloop.mlir +++ b/mlir/test/Target/LLVMIR/omptarget-parallel-wsloop.mlir @@ -18,7 +18,6 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memo llvm.store %loop_cnt, %gep : i32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } diff --git a/mlir/test/Target/LLVMIR/omptarget-wsloop-collapsed.mlir b/mlir/test/Target/LLVMIR/omptarget-wsloop-collapsed.mlir index 13d34b7e58f77..b7aecec308ef3 100644 --- a/mlir/test/Target/LLVMIR/omptarget-wsloop-collapsed.mlir +++ b/mlir/test/Target/LLVMIR/omptarget-wsloop-collapsed.mlir @@ -17,7 +17,6 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memo llvm.store %1, %4 : i32, !llvm.ptr omp.yield } - omp.terminator } llvm.return } diff --git a/mlir/test/Target/LLVMIR/omptarget-wsloop.mlir b/mlir/test/Target/LLVMIR/omptarget-wsloop.mlir index ee851eaf71ac0..e2a8d88bd181a 100644 --- a/mlir/test/Target/LLVMIR/omptarget-wsloop.mlir +++ b/mlir/test/Target/LLVMIR/omptarget-wsloop.mlir @@ -14,7 +14,6 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memo llvm.store %loop_cnt, %gep : i32, !llvm.ptr omp.yield } - omp.terminator } llvm.return } @@ -27,7 +26,6 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memo omp.loop_nest (%loop_cnt) : i32 = (%loop_lb) to (%loop_ub) inclusive step (%loop_step) { omp.yield } - omp.terminator } llvm.return } diff --git a/mlir/test/Target/LLVMIR/openmp-data-target-device.mlir b/mlir/test/Target/LLVMIR/openmp-data-target-device.mlir index 3dad3e9eee60d..717a77e61b9a1 100644 --- a/mlir/test/Target/LLVMIR/openmp-data-target-device.mlir +++ b/mlir/test/Target/LLVMIR/openmp-data-target-device.mlir @@ -46,7 +46,6 @@ module attributes { } { llvm.store %21, %30 : i32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } diff --git a/mlir/test/Target/LLVMIR/openmp-llvm.mlir b/mlir/test/Target/LLVMIR/openmp-llvm.mlir index 5d76e87472dfe..c7ddbda8e8a92 100644 --- a/mlir/test/Target/LLVMIR/openmp-llvm.mlir +++ b/mlir/test/Target/LLVMIR/openmp-llvm.mlir @@ -351,7 +351,6 @@ llvm.func @wsloop_simple(%arg0: !llvm.ptr) { llvm.store %3, %4 : f32, !llvm.ptr omp.yield } - omp.terminator // CHECK: call void @__kmpc_for_static_fini(ptr @[[$loc_struct]], }) : () -> () omp.terminator @@ -374,7 +373,6 @@ llvm.func @wsloop_inclusive_1(%arg0: !llvm.ptr) { llvm.store %3, %4 : f32, !llvm.ptr omp.yield } - omp.terminator }) : () -> () llvm.return } @@ -394,7 +392,6 @@ llvm.func @wsloop_inclusive_2(%arg0: !llvm.ptr) { llvm.store %3, %4 : f32, !llvm.ptr omp.yield } - omp.terminator }) : () -> () llvm.return } @@ -412,7 +409,6 @@ llvm.func @test_omp_wsloop_static_defchunk(%lb : i32, %ub : i32, %step : i32) -> llvm.call @body(%iv) : (i32) -> () omp.yield } - omp.terminator } llvm.return } @@ -431,7 +427,6 @@ llvm.func @test_omp_wsloop_static_1(%lb : i32, %ub : i32, %step : i32) -> () { llvm.call @body(%iv) : (i32) -> () omp.yield } - omp.terminator } llvm.return } @@ -450,7 +445,6 @@ llvm.func @test_omp_wsloop_static_2(%lb : i32, %ub : i32, %step : i32) -> () { llvm.call @body(%iv) : (i32) -> () omp.yield } - omp.terminator } llvm.return } @@ -469,7 +463,6 @@ llvm.func @test_omp_wsloop_dynamic(%lb : i64, %ub : i64, %step : i64) -> () { llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -489,7 +482,6 @@ llvm.func @test_omp_wsloop_dynamic_chunk_const(%lb : i64, %ub : i64, %step : i64 llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -512,7 +504,6 @@ llvm.func @test_omp_wsloop_dynamic_chunk_var(%lb : i32, %ub : i32, %step : i32) llvm.call @body(%iv) : (i32) -> () omp.yield } - omp.terminator } llvm.return } @@ -535,7 +526,6 @@ llvm.func @test_omp_wsloop_dynamic_chunk_var2(%lb : i32, %ub : i32, %step : i32) llvm.call @body(%iv) : (i32) -> () omp.yield } - omp.terminator } llvm.return } @@ -554,7 +544,6 @@ llvm.func @test_omp_wsloop_dynamic_chunk_var3(%lb : i32, %ub : i32, %step : i32, llvm.call @body(%iv) : (i32) -> () omp.yield } - omp.terminator } llvm.return } @@ -573,7 +562,6 @@ llvm.func @test_omp_wsloop_auto(%lb : i64, %ub : i64, %step : i64) -> () { llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -592,7 +580,6 @@ llvm.func @test_omp_wsloop_runtime(%lb : i64, %ub : i64, %step : i64) -> () { llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -611,7 +598,6 @@ llvm.func @test_omp_wsloop_guided(%lb : i64, %ub : i64, %step : i64) -> () { llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -630,7 +616,6 @@ llvm.func @test_omp_wsloop_dynamic_nonmonotonic(%lb : i64, %ub : i64, %step : i6 llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -649,7 +634,6 @@ llvm.func @test_omp_wsloop_dynamic_monotonic(%lb : i64, %ub : i64, %step : i64) llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -668,7 +652,6 @@ llvm.func @test_omp_wsloop_runtime_simd(%lb : i64, %ub : i64, %step : i64) -> () llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -687,7 +670,6 @@ llvm.func @test_omp_wsloop_guided_simd(%lb : i64, %ub : i64, %step : i64) -> () llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -706,7 +688,6 @@ llvm.func @simd_simple(%lb : i64, %ub : i64, %step : i64, %arg0: !llvm.ptr) { llvm.store %3, %4 : f32, !llvm.ptr omp.yield } - "omp.terminator"() : () -> () }) : () -> () llvm.return @@ -746,7 +727,6 @@ llvm.func @simd_simple_multiple(%lb1 : i64, %ub1 : i64, %step1 : i64, %lb2 : i64 llvm.store %3, %5 : f32, !llvm.ptr omp.yield } - omp.terminator } llvm.return } @@ -770,7 +750,6 @@ llvm.func @simd_simple_multiple_simdlen(%lb1 : i64, %ub1 : i64, %step1 : i64, %l llvm.store %3, %5 : f32, !llvm.ptr omp.yield } - omp.terminator } llvm.return } @@ -791,7 +770,6 @@ llvm.func @simd_simple_multiple_safelen(%lb1 : i64, %ub1 : i64, %step1 : i64, %l llvm.store %3, %5 : f32, !llvm.ptr omp.yield } - omp.terminator } llvm.return } @@ -811,7 +789,6 @@ llvm.func @simd_simple_multiple_simdlen_safelen(%lb1 : i64, %ub1 : i64, %step1 : llvm.store %3, %5 : f32, !llvm.ptr omp.yield } - omp.terminator } llvm.return } @@ -840,7 +817,6 @@ llvm.func @simd_if(%arg0: !llvm.ptr {fir.bindc_name = "n"}, %arg1: !llvm.ptr {fi llvm.store %arg2, %1 : i32, !llvm.ptr omp.yield } - omp.terminator } llvm.return } @@ -861,7 +837,6 @@ llvm.func @simd_order() { llvm.store %arg0, %2 : i64, !llvm.ptr omp.yield } - omp.terminator } llvm.return } @@ -885,7 +860,6 @@ llvm.func @test_omp_wsloop_ordered(%lb : i64, %ub : i64, %step : i64) -> () { llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -905,7 +879,6 @@ llvm.func @test_omp_wsloop_static_ordered(%lb : i64, %ub : i64, %step : i64) -> llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -926,7 +899,6 @@ llvm.func @test_omp_wsloop_static_chunk_ordered(%lb : i32, %ub : i32, %step : i3 llvm.call @body(%iv) : (i32) -> () omp.yield } - omp.terminator } llvm.return } @@ -946,7 +918,6 @@ llvm.func @test_omp_wsloop_dynamic_ordered(%lb : i64, %ub : i64, %step : i64) -> llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -966,7 +937,6 @@ llvm.func @test_omp_wsloop_auto_ordered(%lb : i64, %ub : i64, %step : i64) -> () llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -986,7 +956,6 @@ llvm.func @test_omp_wsloop_runtime_ordered(%lb : i64, %ub : i64, %step : i64) -> llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -1006,7 +975,6 @@ llvm.func @test_omp_wsloop_guided_ordered(%lb : i64, %ub : i64, %step : i64) -> llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -1026,7 +994,6 @@ llvm.func @test_omp_wsloop_dynamic_nonmonotonic_ordered(%lb : i64, %ub : i64, %s llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -1046,7 +1013,6 @@ llvm.func @test_omp_wsloop_dynamic_monotonic_ordered(%lb : i64, %ub : i64, %step llvm.call @body(%iv) : (i64) -> () omp.yield } - omp.terminator } llvm.return } @@ -1223,7 +1189,6 @@ llvm.func @collapse_wsloop( llvm.store %34, %20 : i32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -1286,7 +1251,6 @@ llvm.func @collapse_wsloop_dynamic( llvm.store %34, %20 : i32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -1320,7 +1284,6 @@ llvm.func @omp_ordered(%arg0 : i32, %arg1 : i32, %arg2 : i32, %arg3 : i64, } omp.yield } - omp.terminator } omp.wsloop ordered(1) { @@ -1341,7 +1304,6 @@ llvm.func @omp_ordered(%arg0 : i32, %arg1 : i32, %arg2 : i32, %arg3 : i64, omp.yield } - omp.terminator } omp.wsloop ordered(2) { @@ -1373,7 +1335,6 @@ llvm.func @omp_ordered(%arg0 : i32, %arg1 : i32, %arg2 : i32, %arg3 : i64, omp.yield } - omp.terminator } llvm.return @@ -2387,7 +2348,6 @@ llvm.func @repeated_successor(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i1) { ^bb1(%0: i64): // 2 preds: ^bb0, ^bb0 omp.yield } - omp.terminator } llvm.return } diff --git a/mlir/test/Target/LLVMIR/openmp-nested.mlir b/mlir/test/Target/LLVMIR/openmp-nested.mlir index ce5f22f10d7dc..a5224540691f3 100644 --- a/mlir/test/Target/LLVMIR/openmp-nested.mlir +++ b/mlir/test/Target/LLVMIR/openmp-nested.mlir @@ -19,7 +19,6 @@ module { llvm.store %2, %12 : i64, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -30,7 +29,6 @@ module { %21 = llvm.call @printf(%6, %20, %20) vararg(!llvm.func): (!llvm.ptr, i32, i32) -> i32 omp.yield } - omp.terminator } omp.terminator } diff --git a/mlir/test/Target/LLVMIR/openmp-reduction.mlir b/mlir/test/Target/LLVMIR/openmp-reduction.mlir index dcac402d5fa28..6d74a925b87b5 100644 --- a/mlir/test/Target/LLVMIR/openmp-reduction.mlir +++ b/mlir/test/Target/LLVMIR/openmp-reduction.mlir @@ -34,7 +34,6 @@ llvm.func @simple_reduction(%lb : i64, %ub : i64, %step : i64) { llvm.store %3, %prv : f32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -118,7 +117,6 @@ llvm.func @reuse_declaration(%lb : i64, %ub : i64, %step : i64) { llvm.store %6, %prv1 : f32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -207,7 +205,6 @@ llvm.func @missing_omp_reduction(%lb : i64, %ub : i64, %step : i64) { llvm.store %4, %prv0 : f32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -297,7 +294,6 @@ llvm.func @double_reference(%lb : i64, %ub : i64, %step : i64) { llvm.store %5, %prv : f32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -393,7 +389,6 @@ llvm.func @no_atomic(%lb : i64, %ub : i64, %step : i64) { llvm.store %6, %prv1 : f32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } @@ -549,7 +544,6 @@ llvm.func @parallel_nested_workshare_reduction(%ub : i64) { llvm.store %add, %prv : i32, !llvm.ptr omp.yield } - omp.terminator } omp.terminator } diff --git a/mlir/test/Target/LLVMIR/openmp-wsloop-reduction-cleanup.mlir b/mlir/test/Target/LLVMIR/openmp-wsloop-reduction-cleanup.mlir index 7726b980581fa..1a5065fec026e 100644 --- a/mlir/test/Target/LLVMIR/openmp-wsloop-reduction-cleanup.mlir +++ b/mlir/test/Target/LLVMIR/openmp-wsloop-reduction-cleanup.mlir @@ -36,7 +36,6 @@ llvm.store %0, %arg1 : i32, !llvm.ptr omp.yield } - omp.terminator } llvm.return }