[Mlir-commits] [mlir] [mlir][vector] Avoid setting padding by default to `0` in `vector.transfer_read` prefer `ub.poisson` (PR #146088)

Fabian Mora llvmlistbot at llvm.org
Fri Jun 27 09:23:16 PDT 2025


================
@@ -292,6 +292,11 @@ bool arith::ConstantIndexOp::classof(Operation *op) {
   return false;
 }
 
+Value mlir::arith::getZeroConstant(OpBuilder &builder, Location loc,
+                                   Type type) {
+  return builder.create<arith::ConstantOp>(loc, builder.getZeroAttr(type));
+}
----------------
fabianmcg wrote:

Not really. It only reduces written code size and IMO makes it clear from the get go what the function is doing, and given it's an important constant I added it. But I can remove it.

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


More information about the Mlir-commits mailing list