Skip to content

Commit a888026

Browse files
authored
[mlir] Fix CI breakage from #146228 (#149378)
Some platforms print `{anonymous}` instead of the other two forms accepted by the test regex. This PR just removes the attempt to guess how the anonymous namespace will be printed. @Kewen12 is there a way to trigger the particular CIs that failed in #146228 on this PR? Co-authored-by: Jeremy Kun <[email protected]>
1 parent 4e6b843 commit a888026

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

mlir/test/IR/test-pattern-logging-listener.mlir

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22
// RUN: --allow-unregistered-dialect --debug-only=pattern-logging-listener 2>&1 | FileCheck %s
33

44
// Check that when replacing an op with a new op, we get appropriate
5-
// pattern-logging lines. The regex is because the anonymous namespace is
6-
// printed differently on different platforms.
5+
// pattern-logging lines. The use of check same is to avoid the complexity of
6+
// matching the anonymous namespace prefix, which can be one of {anonymous} vs
7+
// {anonymous_namespace} vs `anonymous_namespace` (and maybe others?) on the
8+
// various platforms.
79

8-
// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationInserted | test.new_op
9-
// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationReplaced (with values) | test.replace_with_new_op
10-
// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationModified | arith.addi
11-
// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationModified | arith.addi
12-
// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationErased | test.replace_with_new_op
10+
// CHECK: [pattern-logging-listener]
11+
// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationInserted | test.new_op
12+
// CHECK: [pattern-logging-listener]
13+
// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationReplaced (with values) | test.replace_with_new_op
14+
// CHECK: [pattern-logging-listener]
15+
// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationModified | arith.addi
16+
// CHECK: [pattern-logging-listener]
17+
// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationModified | arith.addi
18+
// CHECK: [pattern-logging-listener]
19+
// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationErased | test.replace_with_new_op
1320
func.func @replace_with_new_op() -> i32 {
1421
%a = "test.replace_with_new_op"() : () -> (i32)
1522
%res = arith.addi %a, %a : i32

0 commit comments

Comments
 (0)