aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2020-05-08 13:36:32 +0200
committerAldy Hernandez <aldyh@redhat.com>2020-05-17 13:46:32 +0200
commit8bfc81876f9325891a52d036a9c454d0c81b3033 (patch)
tree74a757aa0d3cd6309354971ef8455858b1f2019b /gcc/tree-vrp.c
parent5b461bdb48956a89dd589abb96e540c0afcc3fee (diff)
downloadgcc-8bfc81876f9325891a52d036a9c454d0c81b3033.zip
gcc-8bfc81876f9325891a52d036a9c454d0c81b3033.tar.gz
gcc-8bfc81876f9325891a52d036a9c454d0c81b3033.tar.bz2
Move operand_less_p to vr-values.c.
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 4b5df54..f8191fa 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -685,32 +685,6 @@ build_symbolic_expr (tree type, tree sym, bool neg, tree inv)
return build2 (pointer_p ? POINTER_PLUS_EXPR : PLUS_EXPR, type, t, inv);
}
-/* Return
- 1 if VAL < VAL2
- 0 if !(VAL < VAL2)
- -2 if those are incomparable. */
-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;
-}
-
/* Compare two values VAL1 and VAL2. Return
-2 if VAL1 and VAL2 cannot be compared at compile-time,