[Mlir-commits] [mlir] [mlir] Fix arith tensor constants (PR #206249)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jul 10 06:09:40 PDT 2026


================

----------------
mygitljf wrote:

yeah, this should not leak into the LLVM conversion path. I changed that.
The only remaining Tensor dialect use is inside the standalone `arith-expand` pass, where it is needed to materialize dynamic-shaped tensor constants. A dynamic ranked tensor `0`/`1` cannot be represented as a dense `arith.constant`, so this expansion uses `tensor.splat` from a scalar constant and the source tensor dimensions.
So this is not meant to make dynamic tensor arith directly LLVM-convertible by itself; it is an arith expansion that still expects tensor lowering later. The LLVM conversion helper keeps the old default and does not enable this path.

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


More information about the Mlir-commits mailing list