diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-05-06 02:35:02 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-05-06 02:35:02 +0200 |
commit | 82aef047eda376f41eccf51ba1277e46160f6420 (patch) | |
tree | 5619489b40701b7b887b9643dc36184b3b15792d /gcc/combine.cc | |
parent | 319aef8d2fde32be5cfed99f321c7f90e33d1f1d (diff) | |
download | gcc-82aef047eda376f41eccf51ba1277e46160f6420.zip gcc-82aef047eda376f41eccf51ba1277e46160f6420.tar.gz gcc-82aef047eda376f41eccf51ba1277e46160f6420.tar.bz2 |
gimple-range-op: Improve handling of sqrt ranges
The previous patch just added basic intrinsic ranges for sqrt
([-0.0, +Inf] +-NAN being the general result range of the function
and [-0.0, +Inf] the general operand range if result isn't NAN etc.),
the following patch intersects those ranges with particular range
computed from argument or result's exact range with the expected
error in ulps taken into account and adds a function (frange_arithmetic
variant) which can be used by other functions as well as helper.
2023-05-06 Jakub Jelinek <jakub@redhat.com>
* value-range.h (frange_arithmetic): Declare.
* range-op-float.cc (frange_arithmetic): No longer static.
* gimple-range-op.cc (frange_mpfr_arg1): New function.
(cfn_sqrt::fold_range): Intersect the generic boundaries range
with range computed from sqrt of the particular bounds.
(cfn_sqrt::op1_range): Intersect the generic boundaries range
with range computed from squared particular bounds.
* gcc.dg/tree-ssa/range-sqrt-2.c: New test.
Diffstat (limited to 'gcc/combine.cc')
0 files changed, 0 insertions, 0 deletions