11// RUN: tco %s | FileCheck %s
22
33// CHECK-LABEL: define void @f1
4- // CHECK: (ptr {{[^%]*}} %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
4+ // CHECK: (ptr captures(none) %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
55func.func @f1(%a : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : index, %p : index, %f : f32) {
66 %c1 = arith.constant 1 : index
77 %s = fir.shape_shift %o, %n, %p, %m : (index, index, index, index) -> !fir.shapeshift<2>
@@ -23,7 +23,7 @@ func.func @f1(%a : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : i
2323}
2424
2525// CHECK-LABEL: define void @f2
26- // CHECK: (ptr {{[^%]*}} %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
26+ // CHECK: (ptr captures(none) %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
2727func.func @f2(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : index, %p : index, %f : f32) {
2828 %c1 = arith.constant 1 : index
2929 %s = fir.shape_shift %o, %n, %p, %m : (index, index, index, index) -> !fir.shapeshift<2>
@@ -47,7 +47,7 @@ func.func @f2(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf
4747}
4848
4949// CHECK-LABEL: define void @f3
50- // CHECK: (ptr {{[^%]*}} %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
50+ // CHECK: (ptr captures(none) %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
5151func.func @f3(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : index, %p : index, %f : f32) {
5252 %c1 = arith.constant 1 : index
5353 %s = fir.shape_shift %o, %n, %p, %m : (index, index, index, index) -> !fir.shapeshift<2>
@@ -72,7 +72,7 @@ func.func @f3(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf
7272}
7373
7474// CHECK-LABEL: define void @f4
75- // CHECK: (ptr {{[^%]*}} %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
75+ // CHECK: (ptr captures(none) %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
7676func.func @f4(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : index, %p : index, %f : f32) {
7777 %c1 = arith.constant 1 : index
7878 %s = fir.shape_shift %o, %n, %p, %m : (index, index, index, index) -> !fir.shapeshift<2>
@@ -102,7 +102,7 @@ func.func @f4(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf
102102// `a = b + f`, with and v assume d shapes.
103103// Tests that the stride from the descriptor is used.
104104// CHECK-LABEL: define void @f5
105- // CHECK: (ptr {{[^%]*}}% [[A:.*]], ptr {{[^%]*}} %[[B:.*]], float %[[F:.*]])
105+ // CHECK: (ptr % [[A:.*]], ptr %[[B:.*]], float %[[F:.*]])
106106func.func @f5(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: !fir.box<!fir.array<?xf32>>, %arg2: f32) {
107107 %c0 = arith.constant 0 : index
108108 %c1 = arith.constant 1 : index
@@ -135,7 +135,7 @@ func.func @f5(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: !fir.box<!fir.array<?xf
135135// contiguous array (e.g. `a(2:10:1) = a(1:9:1) + f`, with a assume d shape).
136136// Test that a temp is created.
137137// CHECK-LABEL: define void @f6
138- // CHECK: (ptr {{[^%]*}} %[[A:[^,]*]], float %[[F:.*]])
138+ // CHECK: (ptr %[[A:[^,]*]], float %[[F:.*]])
139139func.func @f6(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: f32) {
140140 %c0 = arith.constant 0 : index
141141 %c1 = arith.constant 1 : index
@@ -165,7 +165,7 @@ func.func @f6(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: f32) {
165165// Non contiguous array with lower bounds (x = y(100), with y(4:))
166166// Test array_coor offset computation.
167167// CHECK-LABEL: define void @f7(
168- // CHECK: ptr {{[^%]*}}% [[X:[^,]*]], ptr {{[^%]*}} %[[Y:.*]])
168+ // CHECK: ptr captures(none) % [[X:[^,]*]], ptr %[[Y:.*]])
169169func.func @f7(%arg0: !fir.ref<f32>, %arg1: !fir.box<!fir.array<?xf32>>) {
170170 %c4 = arith.constant 4 : index
171171 %c100 = arith.constant 100 : index
@@ -181,7 +181,7 @@ func.func @f7(%arg0: !fir.ref<f32>, %arg1: !fir.box<!fir.array<?xf32>>) {
181181
182182// Test A(:, :)%x reference codegen with A constant shape.
183183// CHECK-LABEL: define void @f8(
184- // CHECK-SAME: ptr {{[^%]*}} %[[A:.*]], i32 %[[I:.*]])
184+ // CHECK-SAME: ptr captures(none) %[[A:.*]], i32 %[[I:.*]])
185185func.func @f8(%a : !fir.ref<!fir.array<2x2x!fir.type<t{i:i32}>>>, %i : i32) {
186186 %c0 = arith.constant 0 : index
187187 %c1 = arith.constant 1 : index
@@ -198,7 +198,7 @@ func.func @f8(%a : !fir.ref<!fir.array<2x2x!fir.type<t{i:i32}>>>, %i : i32) {
198198
199199// Test casts in in array_coor offset computation when type parameters are not i64
200200// CHECK-LABEL: define ptr @f9(
201- // CHECK-SAME: i32 %[[I:.*]], i64 %{{.*}}, i64 %{{.*}}, ptr {{[^%]*}} %[[C:.*]])
201+ // CHECK-SAME: i32 %[[I:.*]], i64 %{{.*}}, i64 %{{.*}}, ptr captures(none) %[[C:.*]])
202202func.func @f9(%i: i32, %e : i64, %j: i64, %c: !fir.ref<!fir.array<?x?x!fir.char<1,?>>>) -> !fir.ref<!fir.char<1,?>> {
203203 %s = fir.shape %e, %e : (i64, i64) -> !fir.shape<2>
204204 // CHECK: %[[CAST:.*]] = sext i32 %[[I]] to i64
0 commit comments