[Mlir-commits] [mlir] [mlir][vector] shape_cast(constant) -> constant fold for non-splats (PR #145539)

Andrzej Warzyński llvmlistbot at llvm.org
Thu Jul 10 08:14:57 PDT 2025


https://github.com/banach-space approved this pull request.

LGTM, thanks!

> Potential downside: It is possible with this folder end up with, instead of 1 large constant and 1 shape_cast, 2 large constants:

You could remove this potentially negative impact (*) by checking the number of users and only folding when there's one user. I wouldn't unless you have a case where this is harmful.

Please wait ~1day before landing, just in case somebody else wants to chime in.

(*) Further discussion implies that the impact would be negligible 🤷🏻 

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


More information about the Mlir-commits mailing list