@@ -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.
@@ -164,6 +164,9 @@ public:
bool op2_range (irange &r, tree type,
const irange &lhs, const irange &op1,
relation_trio = TRIO_VARYING) const final override;
+ bool op2_range (frange &r, tree type,
+ const irange &lhs, const frange &op1,
+ relation_trio = TRIO_VARYING) const final override;
relation_kind op1_op2_relation (const irange &lhs, const irange &,
const irange &) const final override;
new file mode 100644
@@ -0,0 +1,16 @@
+// { dg-do compile }
+// { dg-options "-O2 -fno-thread-jumps -fdisable-tree-fre1 -fdump-tree-evrp-details" }
+
+void a(float, float);
+void b(float, float);
+
+void foo(float x, float y)
+{
+ if (x != y)
+ a (x,y);
+ else if (x < y)
+ b (x,y);
+}
+
+// Test that the false side of if(x != y) has a range for y.
+// { dg-final { scan-tree-dump "2->4 \\(F\\) y_3\\(D\\)" "evrp" } }