[PATCH] D139316: ValueTracking: Teach isKnownNeverInfinity about rounding intrinsics

Joshua Cranmer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 11:25:09 PST 2022


jcranmer-intel added a comment.

In D139316#3984954 <https://reviews.llvm.org/D139316#3984954>, @sepavloff wrote:

> PPC uses double double encoding (https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format), in which a number is represented by a sum of two double precision numbers, where the second just keeps additional mantissa bits. Total number of mantissa bits in ppc_fp128 is about 107 bits. Exponent range is the same as for double numbers: 2^-1022 to 2^1023. So large numbers (above 2^108) are always integers, they do not need rounding and the result of ceil, floor etc is the argument.

My understanding here is that the number of mantissa bits is effectively dynamic, since you could combine a large exponent (e.g., 2^1023) in the first number and a tiny exponent (e.g., 2^-50) in the second one, and all the mantissa bits in the middle would be implied 0. But I have no actual practical experience with `ppc_fp128`, and documentation for these kinds of things isn't great.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139316/new/

https://reviews.llvm.org/D139316



More information about the llvm-commits mailing list