diff options
author | James A. Morrison <phython@gcc.gnu.org> | 2005-07-29 15:22:07 +0000 |
---|---|---|
committer | James A. Morrison <phython@gcc.gnu.org> | 2005-07-29 15:22:07 +0000 |
commit | d2f3ffba9a32449f59973e11b846de08c2683583 (patch) | |
tree | d9660d0e09f0dad3cad64576be6dbc0999cb14c1 /gcc/tree-vrp.c | |
parent | 9e4eb5598d347211a5a50b791bcbea863dfba49b (diff) | |
download | gcc-d2f3ffba9a32449f59973e11b846de08c2683583.zip gcc-d2f3ffba9a32449f59973e11b846de08c2683583.tar.gz gcc-d2f3ffba9a32449f59973e11b846de08c2683583.tar.bz2 |
tree-vrp.c (compare_range_with_value): Return true or false for ~[VAL_1...
2005-07-29 James A. Morrison <phython@gcc.gnu.org>
* tree-vrp.c (compare_range_with_value): Return true or false
for ~[VAL_1, VAL_2] OP VAL if VAL_1 <= VAL <= VAL_2 for NE_EXPR and
EQ_EXPR respectively.
From-SVN: r102558
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 4afe415..68960e5 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -1753,9 +1753,8 @@ compare_range_with_value (enum tree_code comp, value_range_t *vr, tree val) || comp == LE_EXPR) return NULL_TREE; - /* ~[VAL, VAL] == VAL is always false. */ - if (compare_values (vr->min, val) == 0 - && compare_values (vr->max, val) == 0) + /* ~[VAL_1, VAL_2] OP VAL is known if VAL_1 <= VAL <= VAL_2. */ + if (value_inside_range (val, vr) == 1) return (comp == NE_EXPR) ? boolean_true_node : boolean_false_node; return NULL_TREE; |