[Mlir-commits] [mlir] [mlir][arith] Fold scaling_extf and scaling_truncf with constant operands (PR #215123)

Hung Kuan Tseng llvmlistbot at llvm.org
Sun Aug 16 09:58:20 PDT 2026


Tim096 wrote:

@tgymnich ping on this one. Premerge is green, the branch is still clean, and
the patch has not changed since 2026-08-13, when I took the `zip_equal`
suggestion and dropped the NaN special case you asked about.

It is deliberately self-contained: it folds only scales that already are
`f8E8M0FNU`, which both readings of the scale semantics agree on. Widening the
fold to other scale types is still queued behind #215295, as we agreed, so
nothing here depends on how that lands.

While you are here: #215295 has not moved since @krzysz00 objected to the
exponent-only reading for non-`f8E8M0FNU` scales, which is the opposite of the
answer you gave on this PR. That disagreement is the only thing blocking the
follow-up, and it comes down to one question -- whether
`arith.scaling_truncf(in, scale : f16)` means `in / scale` or
`in / 2^exponent(scale)`. A line from you there would unblock it.

I have no commit access, so this one needs someone to land it as well.


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


More information about the Mlir-commits mailing list