HomePhabricator

[mlir][tosa] Fix tosa.cast semantics to perform rounding/clipping

Authored by rsuderman on May 12 2021, 9:47 PM.

Description

[mlir][tosa] Fix tosa.cast semantics to perform rounding/clipping

Rounding to integers requires rounding (for floating points) and clipping
to the min/max values of the destination range. Added this behavior and
updated tests appropriately.

Reviewed By: sjarus, silvas

Differential Revision: https://reviews.llvm.org/D102375