[Mlir-commits] [mlir] [mlir] [arith] Fold trunc(extremum(ext(lhs), ext(rhs))) (PR #214658)

Mehdi Amini llvmlistbot at llvm.org
Fri Aug 7 02:23:06 PDT 2026


joker-eph wrote:

>  If a particular hardware pass creates that pattern because it doesn't support BF16 MAX, it will be reversed in the first canonicalization pass.

Seems like "business as usual" to me though?
That is: canonicalization **will** destroy patterns that are non-canonical for the purpose of specific HW or lowering. 
A "codegen prepare" phase (in the LLVM backend terminology) is usually inserted to undo canonicalization for a particular backend (or better: the backend lowering / instruction selection is extended to handle the canonical form and insert the suitable expansion as needed).

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


More information about the Mlir-commits mailing list