[mlir][GPU] Fix incorrect API usage in RewritePatterns
authorMatthias Springer <me@m-sp.org>
Thu, 23 Feb 2023 17:15:14 +0000 (18:15 +0100)
committerMatthias Springer <me@m-sp.org>
Thu, 23 Feb 2023 17:20:37 +0000 (18:20 +0100)
Incorrect API usage was detected by D144552.

Differential Revision: https://reviews.llvm.org/D144637

mlir/lib/Dialect/GPU/IR/GPUDialect.cpp

index a64e5e4..159892e 100644 (file)
@@ -1333,7 +1333,7 @@ public:
         continue;
       validOperands.push_back(operand);
     }
-    op->setOperands(validOperands);
+    rewriter.updateRootInPlace(op, [&]() { op->setOperands(validOperands); });
     return success();
   }
 };