Skip to content

Commit 10ccb3e

Browse files
committed
[rebase] add some CHECK-DAGs around constant creation in tests
1 parent 5e6f3c3 commit 10ccb3e

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

flang/test/Lower/array-character.f90

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
! CHECK-SAME: %[[VAL_0:.*]]: !fir.boxchar<1>,
55
! CHECK-SAME: %[[VAL_1:.*]]: !fir.boxchar<1>) {
66
subroutine issue(c1, c2)
7-
! CHECK: %[[VAL_2:.*]] = arith.constant false
8-
! CHECK: %[[VAL_3:.*]] = arith.constant 32 : i8
9-
! CHECK: %[[VAL_4:.*]] = arith.constant 3 : index
10-
! CHECK: %[[VAL_5:.*]] = arith.constant 4 : index
11-
! CHECK: %[[VAL_6:.*]] = arith.constant 0 : index
12-
! CHECK: %[[VAL_7:.*]] = arith.constant 1 : index
7+
! CHECK-DAG: %[[VAL_2:.*]] = arith.constant false
8+
! CHECK-DAG: %[[VAL_3:.*]] = arith.constant 32 : i8
9+
! CHECK-DAG: %[[VAL_4:.*]] = arith.constant 3 : index
10+
! CHECK-DAG: %[[VAL_5:.*]] = arith.constant 4 : index
11+
! CHECK-DAG: %[[VAL_6:.*]] = arith.constant 0 : index
12+
! CHECK-DAG: %[[VAL_7:.*]] = arith.constant 1 : index
1313
! CHECK: %[[VAL_8:.*]]:2 = fir.unboxchar %[[VAL_0]] : (!fir.boxchar<1>) -> (!fir.ref<!fir.char<1,?>>, index)
1414
! CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_8]]#0 : (!fir.ref<!fir.char<1,?>>) -> !fir.ref<!fir.array<3x!fir.char<1,4>>>
1515
! CHECK: %[[VAL_10:.*]]:2 = fir.unboxchar %[[VAL_1]] : (!fir.boxchar<1>) -> (!fir.ref<!fir.char<1,?>>, index)
@@ -55,9 +55,9 @@ subroutine issue(c1, c2)
5555

5656
! CHECK-LABEL: func @_QQmain() {
5757
program p
58-
! CHECK: %[[VAL_0:.*]] = arith.constant 4 : index
59-
! CHECK: %[[VAL_1:.*]] = arith.constant 3 : index
60-
! CHECK: %[[VAL_2:.*]] = arith.constant -1 : i32
58+
! CHECK-DAG: %[[VAL_0:.*]] = arith.constant 4 : index
59+
! CHECK-DAG: %[[VAL_1:.*]] = arith.constant 3 : index
60+
! CHECK-DAG: %[[VAL_2:.*]] = arith.constant -1 : i32
6161
! CHECK: %[[VAL_5:.*]] = fir.address_of(@_QEc1) : !fir.ref<!fir.array<3x!fir.char<1,4>>>
6262
! CHECK: %[[VAL_6:.*]] = fir.address_of(@_QEc2) : !fir.ref<!fir.array<3x!fir.char<1,4>>>
6363
! CHECK: %[[VAL_7:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref<!fir.char<1,
@@ -91,12 +91,12 @@ end program p
9191

9292
! CHECK-LABEL: func @_QPcharlit() {
9393
subroutine charlit
94-
! CHECK: %[[VAL_0:.*]] = arith.constant -1 : i32
95-
! CHECK: %[[VAL_3:.*]] = arith.constant 3 : index
96-
! CHECK: %[[VAL_4:.*]] = arith.constant false
97-
! CHECK: %[[VAL_5:.*]] = arith.constant 4 : index
98-
! CHECK: %[[VAL_6:.*]] = arith.constant 0 : index
99-
! CHECK: %[[VAL_7:.*]] = arith.constant 1 : index
94+
! CHECK-DAG: %[[VAL_0:.*]] = arith.constant -1 : i32
95+
! CHECK-DAG: %[[VAL_3:.*]] = arith.constant 3 : index
96+
! CHECK-DAG: %[[VAL_4:.*]] = arith.constant false
97+
! CHECK-DAG: %[[VAL_5:.*]] = arith.constant 4 : index
98+
! CHECK-DAG: %[[VAL_6:.*]] = arith.constant 0 : index
99+
! CHECK-DAG: %[[VAL_7:.*]] = arith.constant 1 : index
100100
! CHECK: %[[VAL_8:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref<!fir.char<1,
101101
! CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_8]] : (!fir.ref<!fir.char<1,{{.*}}>>) -> !fir.ref<i8>
102102
! CHECK: %[[VAL_10:.*]] = fir.call @_FortranAioBeginExternalListOutput(%[[VAL_0]], %[[VAL_9]], %{{.*}}) : (i32, !fir.ref<i8>, i32) -> !fir.ref<i8>

flang/test/Lower/array-constructor-2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ subroutine test1(a, b)
1515

1616
! Look at PARAMETER case
1717
! CHECK: %{{.*}} = fir.address_of(@_QQro.4xi4.6a6af0eea868c84da59807d34f7e1a86) : !fir.ref<!fir.array<4xi32>>
18-
b = arith.constant_array
18+
b = constant_array
1919
end subroutine test1
2020

2121
! Dynamic array ctor with constant extent.

flang/test/Lower/array-elemental-calls-char.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ elemental function elem_return_char(c)
215215
! CHECK-LABEL: func @_QMchar_elemPfoo6(
216216
! CHECK-SAME: %[[VAL_0:.*]]: !fir.boxchar<1>) {
217217
subroutine foo6(c)
218-
! CHECK: %[[VAL_1:.*]] = arith.constant false
219-
! CHECK: %[[VAL_2:.*]] = arith.constant 32 : i8
220-
! CHECK: %[[VAL_3:.*]] = arith.constant 10 : index
221-
! CHECK: %[[VAL_4:.*]] = arith.constant 0 : index
222-
! CHECK: %[[VAL_5:.*]] = arith.constant 1 : index
218+
! CHECK-DAG: %[[VAL_1:.*]] = arith.constant false
219+
! CHECK-DAG: %[[VAL_2:.*]] = arith.constant 32 : i8
220+
! CHECK-DAG: %[[VAL_3:.*]] = arith.constant 10 : index
221+
! CHECK-DAG: %[[VAL_4:.*]] = arith.constant 0 : index
222+
! CHECK-DAG: %[[VAL_5:.*]] = arith.constant 1 : index
223223
! CHECK: %[[VAL_6:.*]]:2 = fir.unboxchar %[[VAL_0]] : (!fir.boxchar<1>) -> (!fir.ref<!fir.char<1,?>>, index)
224224
! CHECK: %[[VAL_7:.*]] = fir.convert %[[VAL_6]]#0 : (!fir.ref<!fir.char<1,?>>) -> !fir.ref<!fir.array<10x!fir.char<1,?>>>
225225
! CHECK: %[[VAL_8:.*]] = fir.shape %[[VAL_3]] : (index) -> !fir.shape<1>

0 commit comments

Comments
 (0)