[PATCH] D53707: [Fixed Point Arithmetic] Refactor fixed point casts

Bjorn Pettersson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 25 08:52:13 PDT 2018


bjope created this revision.
bjope added reviewers: leonardchan, ebevhan.

- 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.


Repository:
  rC Clang

https://reviews.llvm.org/D53707

Files:
  lib/CodeGen/CGExprScalar.cpp
  test/Frontend/fixed_point_conversions.c
  test/Frontend/fixed_point_to_bool.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53707.171113.patch
Type: text/x-patch
Size: 30073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181025/5f82785f/attachment-0001.bin>


More information about the cfe-commits mailing list