Skip to content

Commit 8712dd9

Browse files
klensyklensy
authored and
klensy
committed
review
1 parent 5915608 commit 8712dd9

File tree

4 files changed

+33
-32
lines changed

4 files changed

+33
-32
lines changed

flang/test/Fir/pdt.fir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func.func @_QTt1P.f2.offset(%0 : i32, %1 : i32) -> i32 {
9797

9898
func.func private @bar(!fir.ref<!fir.char<1,?>>)
9999

100-
// CHECK-LABEL: define i8* @_QPfoo(i32 %0, i32 %1)
100+
// CHECK-LABEL: define void @_QPfoo(i32 %0, i32 %1)
101101
func.func @_QPfoo(%arg0 : i32, %arg1 : i32) {
102102
// CHECK: %[[size:.*]] = call i64 @_QTt1P.mem.size(i32 %0, i32 %1)
103103
// CHECK: %[[alloc:.*]] = alloca i8, i64 %[[size]]

flang/test/Lower/OpenACC/acc-set.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ program test_acc_set
2525
! CHECK: acc.set default_async(%[[C1]] : i32)
2626

2727
! CHECK: %[[C1:.*]] = arith.constant 1 : i32
28-
! HLFIR: %[[LOAD_L:.*]] = fir.load %[[L]] : !fir.ref<!fir.logical<4>>
2928
! HLFIR: %[[LOAD_L:.*]] = fir.load %[[DECLL]]#0 : !fir.ref<!fir.logical<4>>
3029
! CHECK: %[[CONV_L:.*]] = fir.convert %[[LOAD_L]] : (!fir.logical<4>) -> i1
3130
! CHECK: acc.set default_async(%[[C1]] : i32) if(%[[CONV_L]])

flang/test/Lower/array.f90

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,29 @@ subroutine range()
114114
data c1/6 * (0.0, 0.0)/
115115
end subroutine range
116116

117+
! CHECK-LABEL: rangeglobal
118+
subroutine rangeGlobal()
119+
integer, dimension(6) :: a0 = (/ 1, 1, 2, 2, 3, 3 /)
120+
121+
end subroutine rangeGlobal
122+
123+
! CHECK-LABEL: hugeglobal
124+
subroutine hugeGlobal()
125+
integer, parameter :: D = 500
126+
integer, dimension(D, D) :: a
127+
128+
a = reshape((/(i, i = 1, D * D)/), shape(a))
129+
end subroutine hugeGlobal
130+
131+
block data
132+
real(selected_real_kind(6)) :: x(5,5)
133+
common /block/ x
134+
data x(1,1), x(2,1), x(3,1) / 1, 1, 0 /
135+
data x(1,2), x(2,2), x(4,2) / 1, 1, 2.4 /
136+
data x(1,3), x(2,3), x(4,3) / 1, 1, 2.4 /
137+
data x(4,4) / 2.4 /
138+
end
139+
117140
! c1 data
118141
! CHECK: fir.global internal @_QFrangeEc1(dense<(0.000000e+00,0.000000e+00)> : tensor<3x2xcomplex<f32>>) : !fir.array<2x3x!fir.complex<4>>
119142

@@ -132,27 +155,6 @@ end subroutine range
132155
! c0 array constructor
133156
! CHECK: fir.global internal @_QQro.2x3xz4.{{.*}}(dense<{{\[}}[(1.000000e+00,1.500000e+00), (2.000000e+00,2.500000e+00)], [(3.000000e+00,3.500000e+00), (4.000000e+00,4.500000e+00)], [(5.000000e+00,5.500000e+00), (6.000000e+00,6.500000e+00)]]> : tensor<3x2xcomplex<f32>>) constant : !fir.array<2x3x!fir.complex<4>>
134157

135-
! CHECK-LABEL: rangeGlobal
136-
subroutine rangeGlobal()
137158
! CHECK: fir.global internal @_QFrangeglobal{{.*}}(dense<[1, 1, 2, 2, 3, 3]> : tensor<6xi32>) : !fir.array<6xi32>
138-
integer, dimension(6) :: a0 = (/ 1, 1, 2, 2, 3, 3 /)
139-
140-
end subroutine rangeGlobal
141-
142-
! CHECK-LABEL: hugeGlobal
143-
subroutine hugeGlobal()
144-
integer, parameter :: D = 500
145-
integer, dimension(D, D) :: a
146159

147160
! CHECK: fir.global internal @_QQro.500x500xi4.{{.*}}(dense<{{.*}}> : tensor<500x500xi32>) constant : !fir.array<500x500xi32>
148-
a = reshape((/(i, i = 1, D * D)/), shape(a))
149-
end subroutine hugeGlobal
150-
151-
block data
152-
real(selected_real_kind(6)) :: x(5,5)
153-
common /block/ x
154-
data x(1,1), x(2,1), x(3,1) / 1, 1, 0 /
155-
data x(1,2), x(2,2), x(4,2) / 1, 1, 2.4 /
156-
data x(1,3), x(2,3), x(4,3) / 1, 1, 2.4 /
157-
data x(4,4) / 2.4 /
158-
end

flang/test/Lower/derived-assignments.f90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,17 +220,17 @@ subroutine test_alloc_comp(t1, t2)
220220
! end type
221221

222222
!contains
223-
! ! CHECK-LABEL: func @_QMcomponent_with_user_def_assignPtest(
224-
! ! CHECK-SAME: %[[t1:.*]]: !fir.ref<!fir.type<_QMcomponent_with_user_def_assignTt{a:!fir.type<_QMcomponent_with_user_def_assignTt0{i:i32,j:i32}>,i:i32}>>{{.*}}, %[[t2:.*]]: !fir.ref<!fir.type<_QMcomponent_with_user_def_assignTt{a:!fir.type<_QMcomponent_with_user_def_assignTt0{i:i32,j:i32}>,i:i32}>>{{.*}}) {
223+
! COM: CHECK-LABEL: func @_QMcomponent_with_user_def_assignPtest(
224+
! COM: CHECK-SAME: %[[t1:.*]]: !fir.ref<!fir.type<_QMcomponent_with_user_def_assignTt{a:!fir.type<_QMcomponent_with_user_def_assignTt0{i:i32,j:i32}>,i:i32}>>{{.*}}, %[[t2:.*]]: !fir.ref<!fir.type<_QMcomponent_with_user_def_assignTt{a:!fir.type<_QMcomponent_with_user_def_assignTt0{i:i32,j:i32}>,i:i32}>>{{.*}}) {
225225
! subroutine test(t1, t2)
226226
! type(t) :: t1, t2
227-
! ! CHECK: %[[tmpBox:.*]] = fir.alloca !fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>
228-
! ! CHECK: %[[t1Box:.*]] = fir.embox %[[t1]] : (!fir.ref<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>) -> !fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>
229-
! ! CHECK: %[[t2Box:.*]] = fir.embox %[[t2]] : (!fir.ref<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>) -> !fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>
230-
! ! CHECK: fir.store %[[t1Box]] to %[[tmpBox]] : !fir.ref<!fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>>
231-
! ! CHECK: %[[lhs:.*]] = fir.convert %[[tmpBox]] : (!fir.ref<!fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>>) -> !fir.ref<!fir.box<none>>
232-
! ! CHECK: %[[rhs:.*]] = fir.convert %[[t2Box]] : (!fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>) -> !fir.box<none>
233-
! ! CHECK: fir.call @_FortranAAssign(%[[lhs]], %[[rhs]], %{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<!fir.box<none>>, !fir.box<none>, !fir.ref<i8>, i32) -> none
227+
! COM: CHECK: %[[tmpBox:.*]] = fir.alloca !fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>
228+
! COM: CHECK: %[[t1Box:.*]] = fir.embox %[[t1]] : (!fir.ref<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>) -> !fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>
229+
! COM: CHECK: %[[t2Box:.*]] = fir.embox %[[t2]] : (!fir.ref<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>) -> !fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>
230+
! COM: CHECK: fir.store %[[t1Box]] to %[[tmpBox]] : !fir.ref<!fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>>
231+
! COM: CHECK: %[[lhs:.*]] = fir.convert %[[tmpBox]] : (!fir.ref<!fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>>) -> !fir.ref<!fir.box<none>>
232+
! COM: CHECK: %[[rhs:.*]] = fir.convert %[[t2Box]] : (!fir.box<!fir.type<_QMcomponent_with_user_def_assignTt{{.*}}>>) -> !fir.box<none>
233+
! COM: CHECK: fir.call @_FortranAAssign(%[[lhs]], %[[rhs]], %{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<!fir.box<none>>, !fir.box<none>, !fir.ref<i8>, i32) -> none
234234
! t1 = t2
235235
! end subroutine
236236
!end module

0 commit comments

Comments
 (0)