aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constraint.cc
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-09-22 18:20:39 +0200
committerAldy Hernandez <aldyh@redhat.com>2022-09-23 10:52:21 +0200
commitb7fd7fb5011106c062df9275ca8fddcbce4ebdeb (patch)
treea42c03a68d1a2a8f16bee2a2b6957ea6a1cf3586 /gcc/cp/constraint.cc
parent76dbbfe62c0d7f4548cb12e757f67a1b1f84c3df (diff)
downloadgcc-b7fd7fb5011106c062df9275ca8fddcbce4ebdeb.zip
gcc-b7fd7fb5011106c062df9275ca8fddcbce4ebdeb.tar.gz
gcc-b7fd7fb5011106c062df9275ca8fddcbce4ebdeb.tar.bz2
frange: drop endpoints to min/max representable numbers for -ffinite-math-only.
Similarly to how we drop NANs to UNDEFINED when -ffinite-math-only, I think we can drop the numbers outside of the min/max representable numbers to the representable number. This means the endpoings to VR_VARYING for -ffinite-math-only can now be the min/max representable, instead of -INF and +INF. Saturating in the setter means that the upcoming implementation for binary operators no longer have to worry about doing the right thing for -ffinite-math-only. If the range goes outside the limits, it'll get chopped down. Tested on x86-64 Linux. gcc/ChangeLog: * range-op-float.cc (build_le): Use vrp_val_*. (build_lt): Same. (build_ge): Same. (build_gt): Same. * value-range.cc (frange::set): Chop ranges outside of the representable numbers for -ffinite-math-only. (frange::normalize_kind): Use vrp_val*. (frange::verify_range): Same. (frange::set_nonnegative): Same. (range_tests_floats): Remove tests that depend on -INF and +INF. * value-range.h (real_max_representable): Add prototype. (real_min_representable): Same. (vrp_val_max): Set max representable number for -ffinite-math-only. (vrp_val_min): Same but for min. (frange::set_varying): Use vrp_val*.
Diffstat (limited to 'gcc/cp/constraint.cc')
0 files changed, 0 insertions, 0 deletions