[Mlir-commits] [mlir] 4d9d105 - [mlir] fix filecheck prefixes in a dataflow test (#75794)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Dec 18 08:11:26 PST 2023


Author: Oleksandr "Alex" Zinenko
Date: 2023-12-18T17:11:21+01:00
New Revision: 4d9d105c7053d67507a3ab1e7cf34bf6d521cc44

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

LOG: [mlir] fix filecheck prefixes in a dataflow test (#75794)

-SAME and -LITERAL do not compose in CHECK commands.

Added: 
    

Modified: 
    mlir/test/Analysis/DataFlow/test-next-access.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Analysis/DataFlow/test-next-access.mlir b/mlir/test/Analysis/DataFlow/test-next-access.mlir
index de0788fb6a1768..70069b10a93983 100644
--- a/mlir/test/Analysis/DataFlow/test-next-access.mlir
+++ b/mlir/test/Analysis/DataFlow/test-next-access.mlir
@@ -398,29 +398,29 @@ func.func @conditonal_call(%arg0: memref<f32>, %cond: i1) {
 // "caller" -> "call" -> "callee" -> "post"
 
 func.func private @callee(%arg0: memref<f32>) {
-  // IP:              name = "callee"
-  // IP-SAME-LITERAL: next_access = [["post"]]
-  // LOCAL:           name = "callee"
-  // LOCAL-SAME:      next_access = ["unknown"]
+  // IP:         name = "callee"
+  // IP-SAME:    next_access = {{\[}}["post"]]
+  // LOCAL:      name = "callee"
+  // LOCAL-SAME: next_access = ["unknown"]
   memref.load %arg0[] {name = "callee"} : memref<f32>
   return
 }
 
 // CHECK-LABEL: @call_and_store_before
 func.func @call_and_store_before(%arg0: memref<f32>) {
-  // IP:              name = "caller"
-  // IP-SAME-LITERAL: next_access = [["call"]]
-  // LOCAL:           name = "caller"
-  // LOCAL-SAME:      next_access = ["unknown"]
-  // LC_AR:           name = "caller"
-  // LC_AR-SAME:      next_access = {{\[}}["call"]]
+  // IP:         name = "caller"
+  // IP-SAME:    next_access = {{\[}}["call"]]
+  // LOCAL:      name = "caller"
+  // LOCAL-SAME: next_access = ["unknown"]
+  // LC_AR:      name = "caller"
+  // LC_AR-SAME: next_access = {{\[}}["call"]]
   memref.load %arg0[] {name = "caller"} : memref<f32>
   // Note that the access after the entire call is "post".
-  // CHECK:              name = "call"
-  // CHECK-SAME-LITERAL: next_access = [["post"], ["post"]]
+  // CHECK:      name = "call"
+  // CHECK-SAME: next_access = {{\[}}["post"], ["post"]]
   test.call_and_store @callee(%arg0), %arg0 {name = "call", store_before_call = true} : (memref<f32>, memref<f32>) -> ()
-  // CHECK:              name = "post"
-  // CHECK-SAME-LITERAL: next_access = ["unknown"]
+  // CHECK:      name = "post"
+  // CHECK-SAME: next_access = ["unknown"]
   memref.load %arg0[] {name = "post"} : memref<f32>
   return
 }
@@ -432,28 +432,28 @@ func.func @call_and_store_before(%arg0: memref<f32>) {
 // "caller" -> "callee" -> "call" -> "post"
 
 func.func private @callee(%arg0: memref<f32>) {
-  // IP:              name = "callee"
-  // IP-SAME-LITERAL: next_access = [["call"]]
-  // LOCAL:           name = "callee"
-  // LOCAL-SAME:      next_access = ["unknown"]
+  // IP:         name = "callee"
+  // IP-SAME:    next_access = {{\[}}["call"]]
+  // LOCAL:      name = "callee"
+  // LOCAL-SAME: next_access = ["unknown"]
   memref.load %arg0[] {name = "callee"} : memref<f32>
   return
 }
 
 // CHECK-LABEL: @call_and_store_after
 func.func @call_and_store_after(%arg0: memref<f32>) {
-  // IP:              name = "caller"
-  // IP-SAME-LITERAL: next_access = [["callee"]]
-  // LOCAL:           name = "caller"
-  // LOCAL-SAME:      next_access = ["unknown"]
-  // LC_AR:           name = "caller"
-  // LC_AR-SAME:      next_access = {{\[}}["call"]]
+  // IP:         name = "caller"
+  // IP-SAME:    next_access = {{\[}}["callee"]]
+  // LOCAL:      name = "caller"
+  // LOCAL-SAME: next_access = ["unknown"]
+  // LC_AR:      name = "caller"
+  // LC_AR-SAME: next_access = {{\[}}["call"]]
   memref.load %arg0[] {name = "caller"} : memref<f32>
-  // CHECK:              name = "call"
-  // CHECK-SAME-LITERAL: next_access = [["post"], ["post"]]
+  // CHECK:      name = "call"
+  // CHECK-SAME: next_access = {{\[}}["post"], ["post"]]
   test.call_and_store @callee(%arg0), %arg0 {name = "call", store_before_call = false} : (memref<f32>, memref<f32>) -> ()
-  // CHECK:              name = "post"
-  // CHECK-SAME-LITERAL: next_access = ["unknown"]
+  // CHECK:      name = "post"
+  // CHECK-SAME: next_access = ["unknown"]
   memref.load %arg0[] {name = "post"} : memref<f32>
   return
 }
@@ -466,12 +466,12 @@ func.func @call_and_store_after(%arg0: memref<f32>) {
 //   - at the entry of the block, the next access is "post".
 // CHECK-LABEL: @store_with_a_region
 func.func @store_with_a_region_before(%arg0: memref<f32>) {
-  // CHECK:              name = "pre"
-  // CHECK-SAME-LITERAL: next_access = [["region"]]
+  // CHECK:      name = "pre"
+  // CHECK-SAME: next_access = {{\[}}["region"]]
   memref.load %arg0[] {name = "pre"} : memref<f32>
   // CHECK:              name = "region"
-  // CHECK-SAME-LITERAL: next_access = [["post"]]
-  // CHECK-SAME-LITERAL: next_at_entry_point = [[["post"]]]
+  // CHECK-SAME: next_access = {{\[}}["post"]]
+  // CHECK-SAME: next_at_entry_point = {{\[}}{{\[}}["post"]]]
   test.store_with_a_region %arg0 attributes { name = "region", store_before_region = true } {
     test.store_with_a_region_terminator
   } : memref<f32>
@@ -485,12 +485,12 @@ func.func @store_with_a_region_before(%arg0: memref<f32>) {
 //   - at the entry of the block, the next access is "region".
 // CHECK-LABEL: @store_with_a_region
 func.func @store_with_a_region_after(%arg0: memref<f32>) {
-  // CHECK:              name = "pre"
-  // CHECK-SAME-LITERAL: next_access = [["region"]]
+  // CHECK:      name = "pre"
+  // CHECK-SAME: next_access = {{\[}}["region"]]
   memref.load %arg0[] {name = "pre"} : memref<f32>
-  // CHECK:              name = "region"
-  // CHECK-SAME-LITERAL: next_access = [["post"]]
-  // CHECK-SAME-LITERAL: next_at_entry_point = [[["region"]]]
+  // CHECK:      name = "region"
+  // CHECK-SAME: next_access = {{\[}}["post"]]
+  // CHECK-SAME: next_at_entry_point = {{\[}}{{\[}}["region"]]]
   test.store_with_a_region %arg0 attributes { name = "region", store_before_region = false } {
     test.store_with_a_region_terminator
   } : memref<f32>
@@ -509,20 +509,20 @@ func.func @store_with_a_region_after(%arg0: memref<f32>) {
 // That is, the order of access is: "pre" -> "region" -> "inner" -> "post".
 // CHECK-LABEL: @store_with_a_region_before_containing_a_load
 func.func @store_with_a_region_before_containing_a_load(%arg0: memref<f32>) {
-  // CHECK:              name = "pre"
-  // CHECK-SAME-LITERAL: next_access = [["region"]]
+  // CHECK:      name = "pre"
+  // CHECK-SAME: next_access = {{\[}}["region"]]
   memref.load %arg0[] {name = "pre"} : memref<f32>
-  // CHECK:              name = "region"
-  // CHECK-SAME-LITERAL: next_access = [["post"]]
-  // CHECK-SAME-LITERAL: next_at_entry_point = [[["inner"]]]
+  // CHECK:      name = "region"
+  // CHECK-SAME: next_access = {{\[}}["post"]]
+  // CHECK-SAME: next_at_entry_point = {{\[}}{{\[}}["inner"]]]
   test.store_with_a_region %arg0 attributes { name = "region", store_before_region = true } {
-    // CHECK:              name = "inner"
-    // CHECK-SAME-LITERAL: next_access = [["post"]]
+    // CHECK:      name = "inner"
+    // CHECK-SAME: next_access = {{\[}}["post"]]
     memref.load %arg0[] {name = "inner"} : memref<f32>
     test.store_with_a_region_terminator
   } : memref<f32>
-  // CHECK:              name = "post"
-  // CHECK-SAME-LITERAL: next_access = ["unknown"]
+  // CHECK:      name = "post"
+  // CHECK-SAME: next_access = ["unknown"]
   memref.load %arg0[] {name = "post"} : memref<f32>
   return
 }
@@ -538,20 +538,20 @@ func.func @store_with_a_region_before_containing_a_load(%arg0: memref<f32>) {
 // That is, the order of access is "pre" -> "inner" -> "region" -> "post".
 // CHECK-LABEL: @store_with_a_region_after_containing_a_load
 func.func @store_with_a_region_after_containing_a_load(%arg0: memref<f32>) {
-  // CHECK:              name = "pre"
-  // CHECK-SAME-LITERAL: next_access = [["inner"]]
+  // CHECK:      name = "pre"
+  // CHECK-SAME: next_access = {{\[}}["inner"]]
   memref.load %arg0[] {name = "pre"} : memref<f32>
-  // CHECK:              name = "region"
-  // CHECK-SAME-LITERAL: next_access = [["post"]]
-  // CHECK-SAME-LITERAL: next_at_entry_point = [[["inner"]]]
+  // CHECK:      name = "region"
+  // CHECK-SAME: next_access = {{\[}}["post"]]
+  // CHECK-SAME: next_at_entry_point = {{\[}}{{\[}}["inner"]]]
   test.store_with_a_region %arg0 attributes { name = "region", store_before_region = false } {
-    // CHECK:              name = "inner"
-    // CHECK-SAME-LITERAL: next_access = [["region"]]
+    // CHECK:      name = "inner"
+    // CHECK-SAME: next_access = {{\[}}["region"]]
     memref.load %arg0[] {name = "inner"} : memref<f32>
     test.store_with_a_region_terminator
   } : memref<f32>
-  // CHECK:              name = "post"
-  // CHECK-SAME-LITERAL: next_access = ["unknown"]
+  // CHECK:      name = "post"
+  // CHECK-SAME: next_access = ["unknown"]
   memref.load %arg0[] {name = "post"} : memref<f32>
   return
 }


        


More information about the Mlir-commits mailing list