Skip to content

Commit c166b1f

Browse files
committed
Simplify lit test. use more descriptive name.
1 parent 9e35848 commit c166b1f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

mlir/test/Transforms/remove-dead-values.mlir

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -569,21 +569,16 @@ module @return_void_with_unused_argument {
569569
call @fn_return_void_with_unused_argument(%arg0, %unused) : (i32, memref<4xi32>) -> ()
570570
return %unused : memref<4xi32>
571571
}
572-
// the function is immutable because it is public.
573-
func.func public @immutable_fn_return_void_with_unused_argument(%arg0: i32, %unused: i32) -> () {
574-
%sum = arith.addi %arg0, %arg0 : i32
575-
%c0 = arith.constant 0 : index
576-
%buf = memref.alloc() : memref<1xi32>
577-
memref.store %sum, %buf[%c0] : memref<1xi32>
572+
// the function signature is immutable because it is public.
573+
func.func public @public_fn_with_unused_argument(%unused: i32) -> () {
578574
return
579575
}
580576
// CHECK-LABEL: func.func @main2
581-
// CHECK-SAME: (%[[ARG0_MAIN:.*]]: i32)
582577
// CHECK: %[[UNUSED:.*]] = arith.constant 0 : i32
583-
// CHECK: call @immutable_fn_return_void_with_unused_argument(%[[ARG0_MAIN]], %[[UNUSED]]) : (i32, i32) -> ()
578+
// CHECK: call @public_fn_with_unused_argument(%[[UNUSED]]) : (i32) -> ()
584579
func.func @main2(%arg0: i32) -> () {
585580
%zero = arith.constant 0 : i32
586-
call @immutable_fn_return_void_with_unused_argument(%arg0, %zero) : (i32, i32) -> ()
581+
call @public_fn_with_unused_argument(%zero) : (i32) -> ()
587582
return
588583
}
589584
}

0 commit comments

Comments
 (0)