[Mlir-commits] [mlir] [mlir][xegpu] Fix operand layouts when rematerializing on layout conflict (PR #224730)

Nishant Patel llvmlistbot at llvm.org
Fri Oct 2 17:06:48 PDT 2026


================
@@ -1652,6 +1652,36 @@ LogicalResult ResolveLayoutConflicts::assignResultLayout(OpResult &result) {
   return success();
 }
 
+// Recursively rematerialize a trivially-rematerializable producer subtree so
+// that the clone yields `layout`. Cloning only the producer would leave its
+// operands pointing at values that carry the original (conflicting) layout,
----------------
nbpatel wrote:

It is technically a new conflict, but the main traversal never sees it because the clone is inserted behind the walk's current position, and since `isTriviallyRematerializable` already covers the whole subtree, cloning it recursively in one shot gives the same result the traversal would.



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


More information about the Mlir-commits mailing list