[Mlir-commits] [mlir] [MLIR][Python] Add effect and speculatability specifiers for Python-defined ops (PR #216773)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Aug 22 08:13:52 PDT 2026


================
@@ -288,6 +317,41 @@ def run_pass(source, pipeline):
         read_across_write.count('"memory_effects_test.read"'),
     )
 
+    recursive_cse = run_pass(
+        """
+        module {
+          func.func @test() -> (i32, i32, i32, i32) {
+            %0 = "memory_effects_test.region"() ({
+              "memory_effects_test.no_effect"() : () -> ()
+            }) : () -> i32
+            %1 = "memory_effects_test.region"() ({
+              "memory_effects_test.no_effect"() : () -> ()
+            }) : () -> i32
+            %2 = "memory_effects_test.recursive_region"() ({
+              "memory_effects_test.no_effect"() : () -> ()
+            }) : () -> i32
+            %3 = "memory_effects_test.recursive_region"() ({
+              "memory_effects_test.no_effect"() : () -> ()
+            }) : () -> i32
+            return %0, %1, %2, %3 : i32, i32, i32, i32
+          }
+        }
+        """,
----------------
PragmaTwice wrote:

I changed my mind. I'll update these tests soon.

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


More information about the Mlir-commits mailing list