[Mlir-commits] [mlir] [mlir] Add side-effect check to moveOperationDependencies (PR #176361)

Jorn Tuyls llvmlistbot at llvm.org
Wed Jan 21 00:59:34 PST 2026


================
@@ -490,3 +503,51 @@ module attributes {transform.with_named_sequence} {
     transform.yield
   }
 }
+
+// -----
+
+// moveValueDefinitions: cannot move when slice has side-effecting ops
+func.func @move_value_defs_side_effecting(%arg0 : memref<index>) -> index {
+  %0 = "before"() : () -> (index)
+  %1 = memref.load %arg0[] : memref<index>
----------------
jtuyls wrote:

Yeah, the docstring mentions this, but it would indeed be harder to check this, so I think as well that conservative is ok for now.

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


More information about the Mlir-commits mailing list