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

Fabian Mora llvmlistbot at llvm.org
Mon Jun 30 09:59:23 PDT 2025


================
@@ -154,6 +154,9 @@ Value getReductionOp(AtomicRMWKind op, OpBuilder &builder, Location loc,
                      Value lhs, Value rhs);
 
 arith::CmpIPredicate invertPredicate(arith::CmpIPredicate pred);
+
+/// Creates an `arith.constant` operation with a zero value of type `type`.
+Value getZeroConstant(OpBuilder &builder, Location loc, Type type);
----------------
fabianmcg wrote:

The issue is here:
https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/IR/BuiltinAttributes.td#L654-L657
So while it might be a good decision to reject building the attr with 0. I think that change is out of scope of that PR and requires more discussion, on how to handle attributes for float values that cannot be properly represented.

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


More information about the Mlir-commits mailing list