aboutsummaryrefslogtreecommitdiff
path: root/gcc/range-op-float.cc
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2023-09-15 08:24:24 -0400
committerAldy Hernandez <aldyh@redhat.com>2023-09-19 12:30:01 -0400
commit9c739c9893ca6af841e7c67cce0ad9c17a248d13 (patch)
treedf09c1c7803e63188b0ad7c7207d8b148014a985 /gcc/range-op-float.cc
parentd2f53a601a23925b795ac162f7936163c3461b2c (diff)
downloadgcc-9c739c9893ca6af841e7c67cce0ad9c17a248d13.zip
gcc-9c739c9893ca6af841e7c67cce0ad9c17a248d13.tar.gz
gcc-9c739c9893ca6af841e7c67cce0ad9c17a248d13.tar.bz2
[frange] Add op2_range for operator_not_equal.
We're missing an op2_range entry for operator_not_equal so GORI can calculate an outgoing edge. The false side of != is true and guarantees we don't have a NAN, so it's important to get this right. We eventually get it through an intersection of various ranges in ranger, but it's best to get things correct as early as possible. gcc/ChangeLog: * range-op-float.cc (operator_not_equal::op2_range): New. * range-op-mixed.h: Add operator_not_equal::op2_range. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/vrp-float-13.c: New test.
Diffstat (limited to 'gcc/range-op-float.cc')
-rw-r--r--gcc/range-op-float.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc
index cc729e1..91d3096 100644
--- a/gcc/range-op-float.cc
+++ b/gcc/range-op-float.cc
@@ -900,6 +900,14 @@ operator_not_equal::op1_range (frange &r, tree type,
return true;
}
+bool
+operator_not_equal::op2_range (frange &r, tree type,
+ const irange &lhs,
+ const frange &op1,
+ relation_trio trio) const
+{
+ return op1_range (r, type, lhs, op1, trio);
+}
// Check if the LHS range indicates a relation between OP1 and OP2.