Skip to content

Commit 4d9d105

Browse files
authored
[mlir] fix filecheck prefixes in a dataflow test (llvm#75794)
-SAME and -LITERAL do not compose in CHECK commands.
1 parent d0285a3 commit 4d9d105

File tree

1 file changed

+55
-55
lines changed

1 file changed

+55
-55
lines changed

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

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -398,29 +398,29 @@ func.func @conditonal_call(%arg0: memref<f32>, %cond: i1) {
398398
// "caller" -> "call" -> "callee" -> "post"
399399

400400
func.func private @callee(%arg0: memref<f32>) {
401-
// IP: name = "callee"
402-
// IP-SAME-LITERAL: next_access = [["post"]]
403-
// LOCAL: name = "callee"
404-
// LOCAL-SAME: next_access = ["unknown"]
401+
// IP: name = "callee"
402+
// IP-SAME: next_access = {{\[}}["post"]]
403+
// LOCAL: name = "callee"
404+
// LOCAL-SAME: next_access = ["unknown"]
405405
memref.load %arg0[] {name = "callee"} : memref<f32>
406406
return
407407
}
408408

409409
// CHECK-LABEL: @call_and_store_before
410410
func.func @call_and_store_before(%arg0: memref<f32>) {
411-
// IP: name = "caller"
412-
// IP-SAME-LITERAL: next_access = [["call"]]
413-
// LOCAL: name = "caller"
414-
// LOCAL-SAME: next_access = ["unknown"]
415-
// LC_AR: name = "caller"
416-
// LC_AR-SAME: next_access = {{\[}}["call"]]
411+
// IP: name = "caller"
412+
// IP-SAME: next_access = {{\[}}["call"]]
413+
// LOCAL: name = "caller"
414+
// LOCAL-SAME: next_access = ["unknown"]
415+
// LC_AR: name = "caller"
416+
// LC_AR-SAME: next_access = {{\[}}["call"]]
417417
memref.load %arg0[] {name = "caller"} : memref<f32>
418418
// Note that the access after the entire call is "post".
419-
// CHECK: name = "call"
420-
// CHECK-SAME-LITERAL: next_access = [["post"], ["post"]]
419+
// CHECK: name = "call"
420+
// CHECK-SAME: next_access = {{\[}}["post"], ["post"]]
421421
test.call_and_store @callee(%arg0), %arg0 {name = "call", store_before_call = true} : (memref<f32>, memref<f32>) -> ()
422-
// CHECK: name = "post"
423-
// CHECK-SAME-LITERAL: next_access = ["unknown"]
422+
// CHECK: name = "post"
423+
// CHECK-SAME: next_access = ["unknown"]
424424
memref.load %arg0[] {name = "post"} : memref<f32>
425425
return
426426
}
@@ -432,28 +432,28 @@ func.func @call_and_store_before(%arg0: memref<f32>) {
432432
// "caller" -> "callee" -> "call" -> "post"
433433

434434
func.func private @callee(%arg0: memref<f32>) {
435-
// IP: name = "callee"
436-
// IP-SAME-LITERAL: next_access = [["call"]]
437-
// LOCAL: name = "callee"
438-
// LOCAL-SAME: next_access = ["unknown"]
435+
// IP: name = "callee"
436+
// IP-SAME: next_access = {{\[}}["call"]]
437+
// LOCAL: name = "callee"
438+
// LOCAL-SAME: next_access = ["unknown"]
439439
memref.load %arg0[] {name = "callee"} : memref<f32>
440440
return
441441
}
442442

443443
// CHECK-LABEL: @call_and_store_after
444444
func.func @call_and_store_after(%arg0: memref<f32>) {
445-
// IP: name = "caller"
446-
// IP-SAME-LITERAL: next_access = [["callee"]]
447-
// LOCAL: name = "caller"
448-
// LOCAL-SAME: next_access = ["unknown"]
449-
// LC_AR: name = "caller"
450-
// LC_AR-SAME: next_access = {{\[}}["call"]]
445+
// IP: name = "caller"
446+
// IP-SAME: next_access = {{\[}}["callee"]]
447+
// LOCAL: name = "caller"
448+
// LOCAL-SAME: next_access = ["unknown"]
449+
// LC_AR: name = "caller"
450+
// LC_AR-SAME: next_access = {{\[}}["call"]]
451451
memref.load %arg0[] {name = "caller"} : memref<f32>
452-
// CHECK: name = "call"
453-
// CHECK-SAME-LITERAL: next_access = [["post"], ["post"]]
452+
// CHECK: name = "call"
453+
// CHECK-SAME: next_access = {{\[}}["post"], ["post"]]
454454
test.call_and_store @callee(%arg0), %arg0 {name = "call", store_before_call = false} : (memref<f32>, memref<f32>) -> ()
455-
// CHECK: name = "post"
456-
// CHECK-SAME-LITERAL: next_access = ["unknown"]
455+
// CHECK: name = "post"
456+
// CHECK-SAME: next_access = ["unknown"]
457457
memref.load %arg0[] {name = "post"} : memref<f32>
458458
return
459459
}
@@ -466,12 +466,12 @@ func.func @call_and_store_after(%arg0: memref<f32>) {
466466
// - at the entry of the block, the next access is "post".
467467
// CHECK-LABEL: @store_with_a_region
468468
func.func @store_with_a_region_before(%arg0: memref<f32>) {
469-
// CHECK: name = "pre"
470-
// CHECK-SAME-LITERAL: next_access = [["region"]]
469+
// CHECK: name = "pre"
470+
// CHECK-SAME: next_access = {{\[}}["region"]]
471471
memref.load %arg0[] {name = "pre"} : memref<f32>
472472
// CHECK: name = "region"
473-
// CHECK-SAME-LITERAL: next_access = [["post"]]
474-
// CHECK-SAME-LITERAL: next_at_entry_point = [[["post"]]]
473+
// CHECK-SAME: next_access = {{\[}}["post"]]
474+
// CHECK-SAME: next_at_entry_point = {{\[}}{{\[}}["post"]]]
475475
test.store_with_a_region %arg0 attributes { name = "region", store_before_region = true } {
476476
test.store_with_a_region_terminator
477477
} : memref<f32>
@@ -485,12 +485,12 @@ func.func @store_with_a_region_before(%arg0: memref<f32>) {
485485
// - at the entry of the block, the next access is "region".
486486
// CHECK-LABEL: @store_with_a_region
487487
func.func @store_with_a_region_after(%arg0: memref<f32>) {
488-
// CHECK: name = "pre"
489-
// CHECK-SAME-LITERAL: next_access = [["region"]]
488+
// CHECK: name = "pre"
489+
// CHECK-SAME: next_access = {{\[}}["region"]]
490490
memref.load %arg0[] {name = "pre"} : memref<f32>
491-
// CHECK: name = "region"
492-
// CHECK-SAME-LITERAL: next_access = [["post"]]
493-
// CHECK-SAME-LITERAL: next_at_entry_point = [[["region"]]]
491+
// CHECK: name = "region"
492+
// CHECK-SAME: next_access = {{\[}}["post"]]
493+
// CHECK-SAME: next_at_entry_point = {{\[}}{{\[}}["region"]]]
494494
test.store_with_a_region %arg0 attributes { name = "region", store_before_region = false } {
495495
test.store_with_a_region_terminator
496496
} : memref<f32>
@@ -509,20 +509,20 @@ func.func @store_with_a_region_after(%arg0: memref<f32>) {
509509
// That is, the order of access is: "pre" -> "region" -> "inner" -> "post".
510510
// CHECK-LABEL: @store_with_a_region_before_containing_a_load
511511
func.func @store_with_a_region_before_containing_a_load(%arg0: memref<f32>) {
512-
// CHECK: name = "pre"
513-
// CHECK-SAME-LITERAL: next_access = [["region"]]
512+
// CHECK: name = "pre"
513+
// CHECK-SAME: next_access = {{\[}}["region"]]
514514
memref.load %arg0[] {name = "pre"} : memref<f32>
515-
// CHECK: name = "region"
516-
// CHECK-SAME-LITERAL: next_access = [["post"]]
517-
// CHECK-SAME-LITERAL: next_at_entry_point = [[["inner"]]]
515+
// CHECK: name = "region"
516+
// CHECK-SAME: next_access = {{\[}}["post"]]
517+
// CHECK-SAME: next_at_entry_point = {{\[}}{{\[}}["inner"]]]
518518
test.store_with_a_region %arg0 attributes { name = "region", store_before_region = true } {
519-
// CHECK: name = "inner"
520-
// CHECK-SAME-LITERAL: next_access = [["post"]]
519+
// CHECK: name = "inner"
520+
// CHECK-SAME: next_access = {{\[}}["post"]]
521521
memref.load %arg0[] {name = "inner"} : memref<f32>
522522
test.store_with_a_region_terminator
523523
} : memref<f32>
524-
// CHECK: name = "post"
525-
// CHECK-SAME-LITERAL: next_access = ["unknown"]
524+
// CHECK: name = "post"
525+
// CHECK-SAME: next_access = ["unknown"]
526526
memref.load %arg0[] {name = "post"} : memref<f32>
527527
return
528528
}
@@ -538,20 +538,20 @@ func.func @store_with_a_region_before_containing_a_load(%arg0: memref<f32>) {
538538
// That is, the order of access is "pre" -> "inner" -> "region" -> "post".
539539
// CHECK-LABEL: @store_with_a_region_after_containing_a_load
540540
func.func @store_with_a_region_after_containing_a_load(%arg0: memref<f32>) {
541-
// CHECK: name = "pre"
542-
// CHECK-SAME-LITERAL: next_access = [["inner"]]
541+
// CHECK: name = "pre"
542+
// CHECK-SAME: next_access = {{\[}}["inner"]]
543543
memref.load %arg0[] {name = "pre"} : memref<f32>
544-
// CHECK: name = "region"
545-
// CHECK-SAME-LITERAL: next_access = [["post"]]
546-
// CHECK-SAME-LITERAL: next_at_entry_point = [[["inner"]]]
544+
// CHECK: name = "region"
545+
// CHECK-SAME: next_access = {{\[}}["post"]]
546+
// CHECK-SAME: next_at_entry_point = {{\[}}{{\[}}["inner"]]]
547547
test.store_with_a_region %arg0 attributes { name = "region", store_before_region = false } {
548-
// CHECK: name = "inner"
549-
// CHECK-SAME-LITERAL: next_access = [["region"]]
548+
// CHECK: name = "inner"
549+
// CHECK-SAME: next_access = {{\[}}["region"]]
550550
memref.load %arg0[] {name = "inner"} : memref<f32>
551551
test.store_with_a_region_terminator
552552
} : memref<f32>
553-
// CHECK: name = "post"
554-
// CHECK-SAME-LITERAL: next_access = ["unknown"]
553+
// CHECK: name = "post"
554+
// CHECK-SAME: next_access = ["unknown"]
555555
memref.load %arg0[] {name = "post"} : memref<f32>
556556
return
557557
}

0 commit comments

Comments
 (0)