[Mlir-commits] [mlir] [mlir] [arith] Fold trunc(extremum(ext(lhs), ext(rhs))) (PR #214658)
Markus Böck
llvmlistbot at llvm.org
Fri Aug 7 03:48:57 PDT 2026
zero9178 wrote:
I agree with mehdi as well. As far as best practices are concerned the above seems to be a very obvious candidate for the canonicalization (removes bunch of operations in favour of one).
If a target specifically has issues handling `arith.maximumf` on f16 then this is a target concern that should be handled in its lowering. After all, the input might already contain such a `arith.maximumf` (regardless of canonicalization!).
The "what is canonical" discussion seems definitely difficult to me, but I think part of it is also because some dialects have just been defined and used very ad-hoc with no clear canonical form (meaning multiple emerged). The existence of such unfortunate cases shouldn't block something simple like the above from landing though
https://github.com/llvm/llvm-project/pull/214658
More information about the Mlir-commits
mailing list