[Mlir-commits] [mlir] cec2443 - Fix the order of directives and the target string

Jacques Pienaar llvmlistbot at llvm.org
Mon Mar 22 11:10:25 PDT 2021


Author: Chia-hung Duan
Date: 2021-03-22T11:10:12-07:00
New Revision: cec244354bb185ca0e431ae447135bef7e98d5e7

URL: https://github.com/llvm/llvm-project/commit/cec244354bb185ca0e431ae447135bef7e98d5e7
DIFF: https://github.com/llvm/llvm-project/commit/cec244354bb185ca0e431ae447135bef7e98d5e7.diff

LOG: 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

Added: 
    

Modified: 
    mlir/test/mlir-reduce/dce-test.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/mlir-reduce/dce-test.mlir b/mlir/test/mlir-reduce/dce-test.mlir
index f98f3cd6b1a8..21605689d647 100644
--- a/mlir/test/mlir-reduce/dce-test.mlir
+++ b/mlir/test/mlir-reduce/dce-test.mlir
@@ -3,14 +3,14 @@
 // This input should be reduced by the pass pipeline so that only
 // the @simple1 function remains as the other functions should be
 // removed by the dead code elimination pass.
-// CHECK-LABEL: func @simple1(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
 
-// CHECK-NOT: func @dead_nested_function
+// CHECK-NOT: func private @dead_private_function
 func private @dead_private_function()
 
-// CHECK-NOT: func @dead_nested_function
+// CHECK-NOT: func nested @dead_nested_function
 func nested @dead_nested_function()
 
+// CHECK-LABEL: func @simple1(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
 func @simple1(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
   "test.crashOp" () : () -> ()
   return


        


More information about the Mlir-commits mailing list