Skip to content

[mlir][dxsa] Document well-defined out-of-range / NaN behavior of float-to-int conversions #204

Description

@tagolog

The float/double to integer conversion ops (ftoi, ftou, dtoi, dtou) have a behavior for inputs that fall outside the representable range of the destination type, and for NaN inputs:

  • out-of-range inputs are clamped to the destination type's range ([INT32_MIN, INT32_MAX] for the signed *toi ops, [0, UINT32_MAX] for the unsigned *tou ops);
  • NaN converts to 0.

Currently none of the four op descriptions in DXSATypeConversionOps.td mention this.
We need to refine proper description for the operations.

Discussion: PR #187 (see @hvdijk's review comment on the dtou description).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions