[Mlir-commits] [mlir] [MLIR][Vector]Add constraints to vector.shape_cast(constant) -> constant (PR #147691)

Mengmeng Sun llvmlistbot at llvm.org
Tue Jul 15 09:27:28 PDT 2025


MengmSun wrote:

> > if the logic of lowering constrained vector needs to be re-considered it must be a big change
> 
> Why would it be a big change? Can we discuss what would be involved and why isn't it feasible?
> 
> Workarounds like the one proposed here are not scalable.And, to me, create code to maintain ... other incorrect code.

This logic is defined 3 years ago and I'm afraid changing this will influence many files especially tests. The duration to fix this problem thoroughly is unpredictable to me.  By the way to fix this problem thoroughly I think only updating the logic of lowering constrained vector to llvm is not enough. As @dcaballe pointed out,
>  why llvm.mlir.constant allows the attribute and the return type to mismatch?
There might be lack of verification for `llvm.mlir.constant` , and other hidden problems existed.

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


More information about the Mlir-commits mailing list