diff options
author | Paul Brook <paul@codesourcery.com> | 2006-03-02 19:38:43 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-03-02 19:38:43 +0000 |
commit | fc448c490975feae3e2c3fadb6e1231fd84d9461 (patch) | |
tree | b7b3d985d2c3a4638fd66a298c98b23f50d02fa9 /gcc/tree-vrp.c | |
parent | b7b4b172d05b06a4854245eda25a42d067a1ce04 (diff) |
Merge from gcc-4_1-branch revision 111560 (gcc-4_1_0-release)
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@111645 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index f88b23e1aeb..c00d7456fc6 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -1102,22 +1102,24 @@ vrp_int_const_binop (enum tree_code code, tree val1, tree val2) { int checkz = compare_values (res, val1); - /* Ensure that res = val1 + val2 >= val1 + /* Ensure that res = val1 [+*] val2 >= val1 or that res = val1 - val2 <= val1. */ - if ((code == PLUS_EXPR && !(checkz == 1 || checkz == 0)) - || (code == MINUS_EXPR && !(checkz == 0 || checkz == -1))) + if (((code == PLUS_EXPR || code == MULT_EXPR) + && !(checkz == 1 || checkz == 0)) + || (code == MINUS_EXPR + && !(checkz == 0 || checkz == -1))) { res = copy_node (res); TREE_OVERFLOW (res) = 1; } } - /* If the operation overflowed but neither VAL1 nor VAL2 are - overflown, return -INF or +INF depending on the operation - and the combination of signs of the operands. */ else if (TREE_OVERFLOW (res) && !TREE_OVERFLOW (val1) && !TREE_OVERFLOW (val2)) { + /* If the operation overflowed but neither VAL1 nor VAL2 are + overflown, return -INF or +INF depending on the operation + and the combination of signs of the operands. */ int sgn1 = tree_int_cst_sgn (val1); int sgn2 = tree_int_cst_sgn (val2); |