[Bug tree-optimization/24021] VRP does not work with floating points

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 10 12:02:03 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24021

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
But just tracking those fpclassify/signbit properties wouldn't be enough,
because in many cases e.g. whether something can be infinite or not will depend
on more precise value ranges.
If we track just a bitmask, can the value be:
zero
subnormal
normal
infinite
qNaN
sNaN
have positive signbit
have negative signbit
then even on simple multiplication or addition we'll need to assume from normal
* normal or normal + normal that it can be infinite.  When we know that
one operand is [-15.123 - epsilon, 23.152 + epsilon] and the other is
[256.0 - epsilon, 512.0 + epsilon], we actually can find out the result will
not be infinite etc.
But sure, tracking in a bitmask the above properties in addition to some
approximate range is useful.


More information about the Gcc-bugs mailing list