gnu/gcc/9231e36eeff6ec576e99f4c7c4b30e9fced44cd1 Add contains_zero_p to the vrange hierarchy.
Introduce a contains_zero_p() predicate on vrange and company,
returning whether the range contains zero. It is a clearer
replacement for nonzero_p(), which only holds for the exact ~[0,0]
range.
Tested on ppc64le Linux.
gcc/ChangeLog:
* value-range.h (vrange::contains_zero_p): New pure virtual.
(unsupported_range::contains_zero_p): Declare.
(irange::contains_zero_p): Declare and define.
(prange::contains_zero_p): Declare and define.
(frange::contains_zero_p): Declare.
(Value_Range::contains_zero_p): New.
* value-range.cc (unsupported_range::contains_zero_p): Define.
(frange::contains_zero_p): Define.
2 files changed