[Mlir-commits] [mlir] [MLIR][Python] Register Containers as Sequences for `match` compatibility (PR #174091)

Maksim Levental llvmlistbot at llvm.org
Wed Dec 31 05:43:19 PST 2025


================
@@ -598,6 +632,22 @@ def testOperationAttributes():
     # CHECK: Dict mapping {'dependent': 'text', 'other.attribute': 3.0, 'some.attribute': 1}
     print("Dict mapping", d)
 
+    # Structural pattern matching test using Mapping
+
+    # CHECK: Matched Mapping Attribute 'some.attribute': 1
+    # CHECK: Matched Mapping Attribute 'other.attribute': 3.0
+    # CHECK: Matched Mapping Attribute 'dependent': text
+    match op:
----------------
makslevental wrote:

Very cool!

https://github.com/llvm/llvm-project/pull/174091


More information about the Mlir-commits mailing list