Implement relational operators for frange with endpoints.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 30 Aug 2022 06:23:51 +0000 (08:23 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 30 Aug 2022 09:26:24 +0000 (11:26 +0200)
commit4fbe3e6aa74dae5c75a73c46ae6683fdecd1a75d
tree220ecc3307a028f7c960b977f5feaf66e9989a3a
parent8bb1df032cc080b751e00c0d7d86c31a630105f9
Implement relational operators for frange with endpoints.

This is the implementation of the relational range operators for
frange.  These are the core operations that require specific FP domain
knowledge.

gcc/ChangeLog:

* range-op-float.cc (finite_operand_p): New.
(build_le): New.
(build_lt): New.
(build_ge): New.
(build_gt): New.
(foperator_equal::fold_range): New implementation with endpoints.
(foperator_equal::op1_range): Same.
(foperator_not_equal::fold_range): Same.
(foperator_not_equal::op1_range): Same.
(foperator_lt::fold_range): Same.
(foperator_lt::op1_range): Same.
(foperator_lt::op2_range): Same.
(foperator_le::fold_range): Same.
(foperator_le::op1_range): Same.
(foperator_le::op2_range): Same.
(foperator_gt::fold_range): Same.
(foperator_gt::op1_range): Same.
(foperator_gt::op2_range): Same.
(foperator_ge::fold_range): Same.
(foperator_ge::op1_range): Same.
(foperator_ge::op2_range): Same.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/recip-3.c: Avoid premature optimization so test
has a chance to succeed.
gcc/range-op-float.cc
gcc/testsuite/gcc.dg/tree-ssa/recip-3.c