[Mlir-commits] [mlir] [mlir][vector] Notify the rewriter when sinking out of warp ops (PR #71964)

Quinn Dawkins llvmlistbot at llvm.org
Fri Nov 10 09:51:01 PST 2023


================
@@ -894,6 +904,11 @@ struct WarpOpTransferRead : public OpRewritePattern<WarpExecuteOnLane0Op> {
       return failure();
 
     rewriter.replaceAllUsesWith(distributedVal, newRead);
+    if (hasMask) {
+      // Notify the rewriter that the warp op is changing.
+      rewriter.startRootUpdate(warpOp);
----------------
qedawkins wrote:

We do it at the end to avoid the unfortunate situation where we notify the rewriter of a change despite the pattern failing.

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


More information about the Mlir-commits mailing list