[Mlir-commits] [mlir] [mlir][vector] Fix cases with multiple yielded transfer_read ops (PR #71625)

Lei Zhang llvmlistbot at llvm.org
Wed Nov 8 22:07:14 PST 2023


================
@@ -913,6 +931,14 @@ struct WarpOpDeadResult : public OpRewritePattern<WarpExecuteOnLane0Op> {
     // Move the body of the old warpOp to a new warpOp.
     WarpExecuteOnLane0Op newWarpOp = moveRegionToNewWarpOpAndReplaceReturns(
         rewriter, warpOp, newYieldValues, newResultTypes);
+
+    // Simplify the new warp op after dropping dead results.
+    auto simplifyFn = [&](Operation *op) {
----------------
antiagainst wrote:

This functor is simple enough; we should just inline it in the `walk` call. (For functors that are complicated it's useful to extract out and give a name to make formatting and logic cleaner.)

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


More information about the Mlir-commits mailing list