[PATCH] D134725: [ADT] Add support for more formats in APFixedPoint

Tyker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 03:38:23 PDT 2022


Tyker created this revision.
Tyker added reviewers: leonardchan, ebevhan.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Tyker requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Prior to this patch APFixedPoint only support semantics where the LsbWeight is is negative and the Width is at least as large as -LsbWeight.
This patch remove both those requirements.
for example:
with LsbWeight = 2, 12 would be represented as 3.
with LsbWeight = -2, 12 would be represented as 48.


https://reviews.llvm.org/D134725

Files:
  llvm/include/llvm/ADT/APFixedPoint.h
  llvm/include/llvm/ADT/APInt.h
  llvm/include/llvm/ADT/APSInt.h
  llvm/lib/Support/APFixedPoint.cpp
  llvm/unittests/ADT/APFixedPointTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134725.463175.patch
Type: text/x-patch
Size: 42290 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220927/46807691/attachment.bin>


More information about the llvm-commits mailing list