This is an archive of the discontinued LLVM Phabricator instance.

[Fixed Point Arithmetic] Refactor fixed point casts
ClosedPublic

Authored by bjope on Oct 25 2018, 8:52 AM.

Details

Summary
  • Added names for some emitted values (such as "tobool" for the result of a cast to boolean).
  • Replaced explicit IRBuilder request for doing sext/zext/trunc by using CreateIntCast instead.
  • Simplify code for emitting satuation into one if-statement for clamping to max, and one if-statement for clamping to min.

Diff Detail

Repository
rC Clang

Event Timeline

bjope created this revision.Oct 25 2018, 8:52 AM
leonardchan accepted this revision.Oct 25 2018, 4:20 PM
This revision is now accepted and ready to land.Oct 25 2018, 4:20 PM
This revision was automatically updated to reflect the committed changes.