[Mlir-commits] [mlir] [mlir][tensor] Verify that `tensor.pad` padding is non-negative (PR #231389)

Federico Bruzzone llvmlistbot at llvm.org
Wed Oct 14 22:46:05 PDT 2026


FedericoBruzzone wrote:

> That's unfortunate but I guess it was already broken/UB, we just didn't document it. I would merge this as is, and discuss the mixed SSA value / attribute issue separately. We have many ops in the tensor / memref dialects with the same problem.

Good point. That's likely true, BTW. Now, it's _simply_ explicitly stated in the `tensor.pad` docs. 

> For reference, there's an [old RFC](https://discourse.llvm.org/t/rfc-more-opfoldresult-and-mixed-indices-in-ops-that-deal-with-shaped-values/72510) where I was arguing in favor of more mixed SSA values / attributes, but I'm no longer sure if that's the best direction.

Thank you for sharing!

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


More information about the Mlir-commits mailing list