This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add math.roundeven and llvm.intr.roundeven
ClosedPublic

Authored by tpopp on Aug 22 2022, 6:50 AM.

Details

Summary

This is similar to math.round, but rounds to even instead of rounding away from
zero in the case of halfway values. This CL also adds lowerings to libm and
to the LLVM intrinsic.

Diff Detail

Event Timeline

tpopp created this revision.Aug 22 2022, 6:50 AM
tpopp requested review of this revision.Aug 22 2022, 6:50 AM
ftynse accepted this revision.Aug 24 2022, 1:12 AM
ftynse added inline comments.
mlir/include/mlir/Dialect/Math/IR/MathOps.td
774

Nit: the comment should be updated as well.

This revision is now accepted and ready to land.Aug 24 2022, 1:12 AM
tpopp added inline comments.Aug 25 2022, 4:28 AM
mlir/include/mlir/Dialect/Math/IR/MathOps.td
774

Nice catch. Thank you and fixed locally before landing.

This revision was landed with ongoing or failed builds.Aug 25 2022, 4:39 AM
This revision was automatically updated to reflect the committed changes.