[Mlir-commits] [mlir] [mlir][Arm] Fix invalid rewrite pattern API violations (PR #78246)

Benjamin Maxwell llvmlistbot at llvm.org
Tue Jan 16 02:20:51 PST 2024


================
@@ -106,7 +106,8 @@ struct RelaxScalableVectorAllocaAlignment
 
     // Set alignment based on the defaults for SVE vectors and predicates.
     unsigned aligment = vectorType.getElementType().isInteger(1) ? 2 : 16;
-    allocaOp.setAlignment(aligment);
+    rewriter.updateRootInPlace(allocaOp,
+                               [&]() { allocaOp.setAlignment(aligment); });
----------------
MacDue wrote:

nit:
```suggestion
                               [&] { allocaOp.setAlignment(aligment); });
```

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


More information about the Mlir-commits mailing list