diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-07-25 16:47:48 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-08-02 14:50:26 +0200 |
commit | 24012539ae3410174b3e755b580a16de826d56a6 (patch) | |
tree | 7dfdd51c10536f6853c7ac7854adac53ea6d0a93 /gcc/gimple-range-fold.cc | |
parent | 5f7e187e7fa4175204dac0d2f9d468d61762c11b (diff) | |
download | gcc-24012539ae3410174b3e755b580a16de826d56a6.zip gcc-24012539ae3410174b3e755b580a16de826d56a6.tar.gz gcc-24012539ae3410174b3e755b580a16de826d56a6.tar.bz2 |
Implement basic range operators to enable floating point VRP.
Without further ado, here is the implementation for floating point
range operators, plus the switch to enable all ranger clients to
handle floats.
These are bare bone implementations good enough for relation operators
to work, while keeping the NAN bits up to date in the frange. There
is also minimal support for keeping track of +-INF when it is obvious.
Tested on x86-64 Linux.
gcc/ChangeLog:
* range-op-float.cc (finite_operands_p): New.
(frelop_early_resolve): New.
(default_frelop_fold_range): New.
(class foperator_equal): New.
(class foperator_not_equal): New.
(class foperator_lt): New.
(class foperator_le): New.
(class foperator_gt): New.
(class foperator_ge): New.
(class foperator_unordered): New.
(class foperator_ordered): New.
(class foperator_relop_unknown): New.
(floating_op_table::floating_op_table): Add above classes to
floating op table.
* value-range.h (frange::supports_p): Enable.
gcc/testsuite/ChangeLog:
* g++.dg/opt/pr94589-2.C: XFAIL.
* gcc.dg/tree-ssa/vrp-float-1.c: New test.
* gcc.dg/tree-ssa/vrp-float-11.c: New test.
* gcc.dg/tree-ssa/vrp-float-3.c: New test.
* gcc.dg/tree-ssa/vrp-float-4.c: New test.
* gcc.dg/tree-ssa/vrp-float-6.c: New test.
* gcc.dg/tree-ssa/vrp-float-7.c: New test.
* gcc.dg/tree-ssa/vrp-float-8.c: New test.
Diffstat (limited to 'gcc/gimple-range-fold.cc')
0 files changed, 0 insertions, 0 deletions