13
13
// the entry block.
14
14
15
15
// CHECK-LABEL: func @condBranch
16
- func @condBranch (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
16
+ func.func @condBranch (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
17
17
cf.cond_br %arg0 , ^bb1 , ^bb2
18
18
^bb1 :
19
19
cf.br ^bb3 (%arg1 : memref <2 xf32 >)
@@ -42,7 +42,7 @@ func @condBranch(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
42
42
// %0 in bb2.
43
43
44
44
// CHECK-LABEL: func @condBranchDynamicType
45
- func @condBranchDynamicType (
45
+ func.func @condBranchDynamicType (
46
46
%arg0: i1 ,
47
47
%arg1: memref <?xf32 >,
48
48
%arg2: memref <?xf32 >,
@@ -84,7 +84,7 @@ func @condBranchDynamicType(
84
84
// %0 in bb2.
85
85
86
86
// CHECK-LABEL: func @condBranchDynamicTypeNested
87
- func @condBranchDynamicTypeNested (
87
+ func.func @condBranchDynamicTypeNested (
88
88
%arg0: i1 ,
89
89
%arg1: memref <?xf32 >,
90
90
%arg2: memref <?xf32 >,
@@ -127,7 +127,7 @@ func @condBranchDynamicTypeNested(
127
127
// the entry block.
128
128
129
129
// CHECK-LABEL: func @criticalEdge
130
- func @criticalEdge (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
130
+ func.func @criticalEdge (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
131
131
cf.cond_br %arg0 , ^bb1 , ^bb2 (%arg1 : memref <2 xf32 >)
132
132
^bb1 :
133
133
%0 = memref.alloc () : memref <2 xf32 >
@@ -152,7 +152,7 @@ func @criticalEdge(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
152
152
// BufferHoisting expected behavior: It shouldn't move the AllocOps.
153
153
154
154
// CHECK-LABEL: func @ifElse
155
- func @ifElse (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
155
+ func.func @ifElse (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
156
156
%0 = memref.alloc () : memref <2 xf32 >
157
157
test.buffer_based in (%arg1: memref <2 xf32 >) out (%0: memref <2 xf32 >)
158
158
cf.cond_br %arg0 ,
@@ -190,7 +190,7 @@ func @ifElse(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
190
190
// BufferHoisting expected behavior: It shouldn't move the AllocOp.
191
191
192
192
// CHECK-LABEL: func @ifElseNoUsers
193
- func @ifElseNoUsers (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
193
+ func.func @ifElseNoUsers (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
194
194
%0 = memref.alloc () : memref <2 xf32 >
195
195
test.buffer_based in (%arg1: memref <2 xf32 >) out (%0: memref <2 xf32 >)
196
196
cf.cond_br %arg0 ,
@@ -222,7 +222,7 @@ func @ifElseNoUsers(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
222
222
// BufferHoisting expected behavior: AllocOps shouldn't be moved.
223
223
224
224
// CHECK-LABEL: func @ifElseNested
225
- func @ifElseNested (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
225
+ func.func @ifElseNested (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
226
226
%0 = memref.alloc () : memref <2 xf32 >
227
227
test.buffer_based in (%arg1: memref <2 xf32 >) out (%0: memref <2 xf32 >)
228
228
cf.cond_br %arg0 ,
@@ -258,7 +258,7 @@ func @ifElseNested(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
258
258
// BufferHoisting expected behavior: It shouldn't move the AllocOps.
259
259
260
260
// CHECK-LABEL: func @redundantOperations
261
- func @redundantOperations (%arg0: memref <2 xf32 >) {
261
+ func.func @redundantOperations (%arg0: memref <2 xf32 >) {
262
262
%0 = memref.alloc () : memref <2 xf32 >
263
263
test.buffer_based in (%arg0: memref <2 xf32 >) out (%0: memref <2 xf32 >)
264
264
%1 = memref.alloc () : memref <2 xf32 >
@@ -283,7 +283,7 @@ func @redundantOperations(%arg0: memref<2xf32>) {
283
283
// entry block.
284
284
285
285
// CHECK-LABEL: func @moving_alloc_and_inserting_missing_dealloc
286
- func @moving_alloc_and_inserting_missing_dealloc (
286
+ func.func @moving_alloc_and_inserting_missing_dealloc (
287
287
%cond: i1 ,
288
288
%arg0: memref <2 xf32 >,
289
289
%arg1: memref <2 xf32 >) {
@@ -318,7 +318,7 @@ func @moving_alloc_and_inserting_missing_dealloc(
318
318
// block.
319
319
320
320
// CHECK-LABEL: func @moving_invalid_dealloc_op_complex
321
- func @moving_invalid_dealloc_op_complex (
321
+ func.func @moving_invalid_dealloc_op_complex (
322
322
%cond: i1 ,
323
323
%arg0: memref <2 xf32 >,
324
324
%arg1: memref <2 xf32 >) {
@@ -347,7 +347,7 @@ func @moving_invalid_dealloc_op_complex(
347
347
// RegionBufferBasedOp should be moved to the entry block.
348
348
349
349
// CHECK-LABEL: func @nested_regions_and_cond_branch
350
- func @nested_regions_and_cond_branch (
350
+ func.func @nested_regions_and_cond_branch (
351
351
%arg0: i1 ,
352
352
%arg1: memref <2 xf32 >,
353
353
%arg2: memref <2 xf32 >) {
@@ -381,7 +381,7 @@ func @nested_regions_and_cond_branch(
381
381
// both if branches until it is finally returned.
382
382
383
383
// CHECK-LABEL: func @nested_region_control_flow
384
- func @nested_region_control_flow (
384
+ func.func @nested_region_control_flow (
385
385
%arg0 : index ,
386
386
%arg1 : index ) -> memref <?x?xf32 > {
387
387
%0 = arith.cmpi eq , %arg0 , %arg1 : index
@@ -407,7 +407,7 @@ func @nested_region_control_flow(
407
407
// The alloc positions of %1 does not need to be changed. %3 is moved upwards.
408
408
409
409
// CHECK-LABEL: func @nested_region_control_flow_div
410
- func @nested_region_control_flow_div (
410
+ func.func @nested_region_control_flow_div (
411
411
%arg0 : index ,
412
412
%arg1 : index ) -> memref <?x?xf32 > {
413
413
%0 = arith.cmpi eq , %arg0 , %arg1 : index
@@ -433,7 +433,7 @@ func @nested_region_control_flow_div(
433
433
// moved upwards.
434
434
435
435
// CHECK-LABEL: func @nested_region_control_flow_div_nested
436
- func @nested_region_control_flow_div_nested (
436
+ func.func @nested_region_control_flow_div_nested (
437
437
%arg0 : index ,
438
438
%arg1 : index ) -> memref <?x?xf32 > {
439
439
%0 = arith.cmpi eq , %arg0 , %arg1 : index
@@ -464,7 +464,7 @@ func @nested_region_control_flow_div_nested(
464
464
// this region.
465
465
466
466
// CHECK-LABEL: func @nested_region_control_flow_div_nested_dependencies
467
- func @nested_region_control_flow_div_nested_dependencies (
467
+ func.func @nested_region_control_flow_div_nested_dependencies (
468
468
%arg0: i32 ,
469
469
%arg1: i1 ,
470
470
%arg2: index ) -> memref <?x?xf32 > {
@@ -503,7 +503,7 @@ func @nested_region_control_flow_div_nested_dependencies(
503
503
// The alloc positions of %0 does not need to be changed.
504
504
505
505
// CHECK-LABEL: func @inner_region_control_flow
506
- func @inner_region_control_flow (%arg0 : index ) -> memref <?x?xf32 > {
506
+ func.func @inner_region_control_flow (%arg0 : index ) -> memref <?x?xf32 > {
507
507
%0 = memref.alloc (%arg0 , %arg0 ) : memref <?x?xf32 >
508
508
%1 = test.region_if %0 : memref <?x?xf32 > -> (memref <?x?xf32 >) then {
509
509
^bb0 (%arg1 : memref <?x?xf32 >):
@@ -528,7 +528,7 @@ func @inner_region_control_flow(%arg0 : index) -> memref<?x?xf32> {
528
528
// The alloc positions of %0 does not need to be changed. %2 is moved upwards.
529
529
530
530
// CHECK-LABEL: func @inner_region_control_flow_div
531
- func @inner_region_control_flow_div (
531
+ func.func @inner_region_control_flow_div (
532
532
%arg0 : index ,
533
533
%arg1 : index ) -> memref <?x?xf32 > {
534
534
%0 = memref.alloc (%arg0 , %arg0 ) : memref <?x?xf32 >
@@ -555,7 +555,7 @@ func @inner_region_control_flow_div(
555
555
// Test Case: Alloca operations shouldn't be moved.
556
556
557
557
// CHECK-LABEL: func @condBranchAlloca
558
- func @condBranchAlloca (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
558
+ func.func @condBranchAlloca (%arg0: i1 , %arg1: memref <2 xf32 >, %arg2: memref <2 xf32 >) {
559
559
cf.cond_br %arg0 , ^bb1 , ^bb2
560
560
^bb1 :
561
561
cf.br ^bb3 (%arg1 : memref <2 xf32 >)
@@ -580,7 +580,7 @@ func @condBranchAlloca(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
580
580
// shouldn't be moved analogously to the ifElseNested test.
581
581
582
582
// CHECK-LABEL: func @ifElseNestedAlloca
583
- func @ifElseNestedAlloca (
583
+ func.func @ifElseNestedAlloca (
584
584
%arg0: i1 ,
585
585
%arg1: memref <2 xf32 >,
586
586
%arg2: memref <2 xf32 >) {
@@ -619,7 +619,7 @@ func @ifElseNestedAlloca(
619
619
// be moved in the beginning analogous to the nestedRegionsAndCondBranch test.
620
620
621
621
// CHECK-LABEL: func @nestedRegionsAndCondBranchAlloca
622
- func @nestedRegionsAndCondBranchAlloca (
622
+ func.func @nestedRegionsAndCondBranchAlloca (
623
623
%arg0: i1 ,
624
624
%arg1: memref <2 xf32 >,
625
625
%arg2: memref <2 xf32 >) {
@@ -652,7 +652,7 @@ func @nestedRegionsAndCondBranchAlloca(
652
652
// The alloc positions of %3 will be moved upwards.
653
653
654
654
// CHECK-LABEL: func @loop_alloc
655
- func @loop_alloc (
655
+ func.func @loop_alloc (
656
656
%lb: index ,
657
657
%ub: index ,
658
658
%step: index ,
@@ -680,7 +680,7 @@ func @loop_alloc(
680
680
// The allocation %4 is not moved upwards.
681
681
682
682
// CHECK-LABEL: func @loop_nested_if_alloc
683
- func @loop_nested_if_alloc (
683
+ func.func @loop_nested_if_alloc (
684
684
%lb: index ,
685
685
%ub: index ,
686
686
%step: index ,
@@ -711,7 +711,7 @@ func @loop_nested_if_alloc(
711
711
// Same behavior is an loop_nested_if_alloc: The allocs are not moved upwards.
712
712
713
713
// CHECK-LABEL: func @loop_nested_alloc
714
- func @loop_nested_alloc (
714
+ func.func @loop_nested_alloc (
715
715
%lb: index ,
716
716
%ub: index ,
717
717
%step: index ,
@@ -752,7 +752,7 @@ func @loop_nested_alloc(
752
752
// -----
753
753
754
754
// CHECK-LABEL: func @loop_nested_alloc_dyn_dependency
755
- func @loop_nested_alloc_dyn_dependency (
755
+ func.func @loop_nested_alloc_dyn_dependency (
756
756
%lb: index ,
757
757
%ub: index ,
758
758
%step: index ,
0 commit comments