[Mlir-commits] [mlir] [mlir][arith] Fix multiplication canonicalizations (PR #144787)
Jakub Kuderski
llvmlistbot at llvm.org
Fri Jun 20 07:17:28 PDT 2025
kuhar wrote:
> Why is it a problem? Seems like the cost-model thing is a lowering problem.
This pattern is kind of obscure while adding logical complexity / maintenance to the codebase. I remember it appearing exactly once in an internal model and I'm not aware of any other real-world input where it actually matches. I think this kind of fold is best done by each backend when we know whether the target natively calculates the high result of multiplication or not.
> That is completely expected: this kind of decomposition are "lowering" (or "codegen prepare") and as such aren't expected to be resilient to canonicalization.
Ack, I agree with you on this point after thinking about this more.
But overall, I don't think this pattern is worth keeping. If someone actually finds a usecase for it, they should be able to re-add it without much effort.
https://github.com/llvm/llvm-project/pull/144787
More information about the Mlir-commits
mailing list