[Mlir-commits] [mlir] [MLIR][Transforms] add eliminate-explicit-rounding pass (PR #93443)

Krzysztof Drewniak llvmlistbot at llvm.org
Thu May 30 01:39:12 PDT 2024


krzysz00 wrote:

I claim that we're well within our rights to define `AllowContract` on truncf and extf to mean "you're allowed to fold extf/truncf pairs. This is intended to replicate the C semantics of allowing promotion to higher-precision datatypes within expressions when explicit casts are not present."

If we don't want to "abuse" the fastmath enum like that, then we ought to put a `UnitAttr:$promotable` on `arith.truncf` and `arith.extf` to allow the elimination. Though perhaps marking `truncf` alone could be sufficient ... . (Name not important, it's late)

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


More information about the Mlir-commits mailing list