aboutsummaryrefslogtreecommitdiff
path: root/gcc/vr-values.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2020-05-17 13:56:55 +0200
committerAldy Hernandez <aldyh@redhat.com>2020-05-17 13:56:55 +0200
commite7e785dfec360573c2e8a700ef570a22359410c5 (patch)
treed86a6c6a2208226e607e9f69170ec5e1d7e25ad9 /gcc/vr-values.c
parent8bfc81876f9325891a52d036a9c454d0c81b3033 (diff)
downloadgcc-e7e785dfec360573c2e8a700ef570a22359410c5.zip
gcc-e7e785dfec360573c2e8a700ef570a22359410c5.tar.gz
gcc-e7e785dfec360573c2e8a700ef570a22359410c5.tar.bz2
Revert previous patch:
2020-05-17 Aldy Hernandez <aldyh@redhat.com> * tree-vrp.c (operand_less_p): Move to... * vr-values.c (operand_less_p): ...here. * tree-vrp.h (operand_less_p): Remove.
Diffstat (limited to 'gcc/vr-values.c')
-rw-r--r--gcc/vr-values.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/gcc/vr-values.c b/gcc/vr-values.c
index f7cba16..2e3a078 100644
--- a/gcc/vr-values.c
+++ b/gcc/vr-values.c
@@ -1104,32 +1104,6 @@ vr_values::check_for_binary_op_overflow (enum tree_code subcode, tree type,
return true;
}
-/* Return
- 1 if VAL < VAL2
- 0 if !(VAL < VAL2)
- -2 if those are incomparable. */
-static int
-operand_less_p (tree val, tree val2)
-{
- /* LT is folded faster than GE and others. Inline the common case. */
- if (TREE_CODE (val) == INTEGER_CST && TREE_CODE (val2) == INTEGER_CST)
- return tree_int_cst_lt (val, val2);
- else if (TREE_CODE (val) == SSA_NAME && TREE_CODE (val2) == SSA_NAME)
- return val == val2 ? 0 : -2;
- else
- {
- int cmp = compare_values (val, val2);
- if (cmp == -1)
- return 1;
- else if (cmp == 0 || cmp == 1)
- return 0;
- else
- return -2;
- }
-
- return 0;
-}
-
/* Try to derive a nonnegative or nonzero range out of STMT relying
primarily on generic routines in fold in conjunction with range data.
Store the result in *VR */