Skip to content

Commit cec2443

Browse files
ChiaHungDuanjpienaar
authored andcommitted
Fix the order of directives and the target string
In the original structure, it will try to match CHECK-LABEL first then see if the subsequent doesn't have the target strings. This is not what we are expected. We are expecting the two functions which will be deleted should be matched before CHECK-LABEL. Also fixed the function names. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D99060
1 parent c21f72e commit cec2443

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mlir/test/mlir-reduce/dce-test.mlir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
// This input should be reduced by the pass pipeline so that only
44
// the @simple1 function remains as the other functions should be
55
// removed by the dead code elimination pass.
6-
// CHECK-LABEL: func @simple1(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
76

8-
// CHECK-NOT: func @dead_nested_function
7+
// CHECK-NOT: func private @dead_private_function
98
func private @dead_private_function()
109

11-
// CHECK-NOT: func @dead_nested_function
10+
// CHECK-NOT: func nested @dead_nested_function
1211
func nested @dead_nested_function()
1312

13+
// CHECK-LABEL: func @simple1(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
1414
func @simple1(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
1515
"test.crashOp" () : () -> ()
1616
return

0 commit comments

Comments
 (0)