Skip to content

Commit 0cb4216

Browse files
committed
Fix tests for custom assembly for loop wrapper
1 parent c82cb8a commit 0cb4216

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

flang/test/HLFIR/bufferize-workshare.fir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_5]](%[[VAL_3]]) {uniq_name = ".tmp.array"} : (!fir.heap<!fir.array<42xi32>>, !fir.shape<1>) -> (!fir.heap<!fir.array<42xi32>>, !fir.heap<!fir.array<42xi32>>)
1313
// CHECK: %[[VAL_7:.*]] = arith.constant true
1414
// CHECK: %[[VAL_8:.*]] = arith.constant 1 : index
15-
// CHECK: "omp.workshare_loop_wrapper"() ({
15+
// CHECK: omp.workshare_loop_wrapper {
1616
// CHECK: omp.loop_nest (%[[VAL_9:.*]]) : index = (%[[VAL_8]]) to (%[[VAL_1]]) inclusive step (%[[VAL_8]]) {
1717
// CHECK: %[[VAL_10:.*]] = hlfir.designate %[[VAL_4]]#0 (%[[VAL_9]]) : (!fir.ref<!fir.array<42xi32>>, index) -> !fir.ref<i32>
1818
// CHECK: %[[VAL_11:.*]] = fir.load %[[VAL_10]] : !fir.ref<i32>
@@ -22,7 +22,7 @@
2222
// CHECK: omp.yield
2323
// CHECK: }
2424
// CHECK: omp.terminator
25-
// CHECK: }) : () -> ()
25+
// CHECK: }
2626
// CHECK: %[[VAL_14:.*]] = fir.undefined tuple<!fir.heap<!fir.array<42xi32>>, i1>
2727
// CHECK: %[[VAL_15:.*]] = fir.insert_value %[[VAL_14]], %[[VAL_7]], [1 : index] : (tuple<!fir.heap<!fir.array<42xi32>>, i1>, i1) -> tuple<!fir.heap<!fir.array<42xi32>>, i1>
2828
// CHECK: %[[VAL_16:.*]] = fir.insert_value %[[VAL_15]], %[[VAL_6]]#0, [0 : index] : (tuple<!fir.heap<!fir.array<42xi32>>, i1>, !fir.heap<!fir.array<42xi32>>) -> tuple<!fir.heap<!fir.array<42xi32>>, i1>

flang/test/Transforms/OpenMP/lower-workshare.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func.func @wsfunc(%arg0: !fir.ref<!fir.array<42xi32>>) {
1313
%3:2 = hlfir.declare %2(%0) {uniq_name = ".tmp.array"} : (!fir.heap<!fir.array<42xi32>>, !fir.shape<1>) -> (!fir.heap<!fir.array<42xi32>>, !fir.heap<!fir.array<42xi32>>)
1414
%true = arith.constant true
1515
%c1 = arith.constant 1 : index
16-
"omp.workshare_loop_wrapper"() ({
16+
omp.workshare_loop_wrapper {
1717
omp.loop_nest (%arg1) : index = (%c1) to (%c42) inclusive step (%c1) {
1818
%7 = hlfir.designate %1#0 (%arg1) : (!fir.ref<!fir.array<42xi32>>, index) -> !fir.ref<i32>
1919
%8 = fir.load %7 : !fir.ref<i32>
@@ -23,7 +23,7 @@ func.func @wsfunc(%arg0: !fir.ref<!fir.array<42xi32>>) {
2323
omp.yield
2424
}
2525
omp.terminator
26-
}) : () -> ()
26+
}
2727
%4 = fir.undefined tuple<!fir.heap<!fir.array<42xi32>>, i1>
2828
%5 = fir.insert_value %4, %true, [1 : index] : (tuple<!fir.heap<!fir.array<42xi32>>, i1>, i1) -> tuple<!fir.heap<!fir.array<42xi32>>, i1>
2929
%6 = fir.insert_value %5, %3#0, [0 : index] : (tuple<!fir.heap<!fir.array<42xi32>>, i1>, !fir.heap<!fir.array<42xi32>>) -> tuple<!fir.heap<!fir.array<42xi32>>, i1>
@@ -52,7 +52,7 @@ func.func @wsfunc(%arg0: !fir.ref<!fir.array<42xi32>>) {
5252
%3:2 = hlfir.declare %2(%0) {uniq_name = ".tmp.array"} : (!fir.heap<!fir.array<42xi32>>, !fir.shape<1>) -> (!fir.heap<!fir.array<42xi32>>, !fir.heap<!fir.array<42xi32>>)
5353
%true = arith.constant true
5454
%c1 = arith.constant 1 : index
55-
"omp.workshare_loop_wrapper"() ({
55+
omp.workshare_loop_wrapper {
5656
omp.loop_nest (%arg1) : index = (%c1) to (%c42) inclusive step (%c1) {
5757
%7 = hlfir.designate %1#0 (%arg1) : (!fir.ref<!fir.array<42xi32>>, index) -> !fir.ref<i32>
5858
%8 = fir.load %7 : !fir.ref<i32>
@@ -64,7 +64,7 @@ func.func @wsfunc(%arg0: !fir.ref<!fir.array<42xi32>>) {
6464
omp.yield
6565
}
6666
omp.terminator
67-
}) : () -> ()
67+
}
6868
%4 = fir.undefined tuple<!fir.heap<!fir.array<42xi32>>, i1>
6969
%5 = fir.insert_value %4, %true, [1 : index] : (tuple<!fir.heap<!fir.array<42xi32>>, i1>, i1) -> tuple<!fir.heap<!fir.array<42xi32>>, i1>
7070
%6 = fir.insert_value %5, %3#0, [0 : index] : (tuple<!fir.heap<!fir.array<42xi32>>, i1>, !fir.heap<!fir.array<42xi32>>) -> tuple<!fir.heap<!fir.array<42xi32>>, i1>

flang/test/Transforms/OpenMP/lower-workshare3.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ func.func @wsfunc() {
5252

5353
%c42 = arith.constant 42 : index
5454
%c1 = arith.constant 1 : index
55-
"omp.workshare_loop_wrapper"() ({
55+
omp.workshare_loop_wrapper {
5656
omp.loop_nest (%arg1) : index = (%c1) to (%c42) inclusive step (%c1) {
5757
"test.test10"(%t1) : (i32) -> ()
5858
"test.test10"(%t5_pure_use) : (i32) -> ()
5959
"test.test10"(%t6_mem_effect_use) : (i32) -> ()
6060
omp.yield
6161
}
6262
omp.terminator
63-
}) : () -> ()
63+
}
6464

6565
"test.test10"(%t2) : (i32) -> ()
6666
fir.if %true {

flang/test/Transforms/OpenMP/lower-workshare4.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ func.func @wsfunc() {
1212
%c2 = arith.constant 2 : index
1313
"test.test3"(%c2) : (index) -> ()
1414

15-
"omp.workshare_loop_wrapper"() ({
15+
omp.workshare_loop_wrapper {
1616
omp.loop_nest (%arg1) : index = (%c1) to (%c42) inclusive step (%c1) {
1717
"test.test2"() : () -> ()
1818
omp.yield
1919
}
2020
omp.terminator
21-
}) : () -> ()
21+
}
2222
omp.terminator
2323
}
2424
omp.terminator

0 commit comments

Comments
 (0)