[Mlir-commits] [mlir] [mlir][MemRef] Add support for emulating narrow floats (PR #148036)
Quinn Dawkins
llvmlistbot at llvm.org
Mon Jul 14 08:18:18 PDT 2025
qedawkins wrote:
> Could you elaborate on why that's the case? (*)For example, any kind of arithmetic on floats would be incorrect if we were interpreting them as ints - though I understand this patch only touches loads and stores.
Right it's because we only touch loads and stores. Even in the integer case if we chose to use float typed containers that would be fine. The fact that we load packed sub-byte types as a single larger int makes arithmetic on the immediate load in the integer case just as nonsensical as in the floating point case.
Your confusion might be because there's a naming overload with narrow type emulation. The *only* thing this narrow type emulation pattern set should care about is loads/stores. Arithmetic is the responsibility of sibling patterns such as ArithNarrowTypeEmulation or ArithExpandOps, depending on the flavor of emulation you want per the underlying data type.
https://github.com/llvm/llvm-project/pull/148036
More information about the Mlir-commits
mailing list