diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-19 12:52:09 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-19 12:52:09 +0000 |
commit | 05a936a0140b1564eed3ff0f58b0af88937fab8a (patch) | |
tree | dc74ecf418e243c8716a1cec9373a3f013075b5d /gcc/tree-ssa-ccp.c | |
parent | 86f0974ba6ff1bd2fca6c94ceabb269f1596fb4f (diff) | |
download | gcc-05a936a0140b1564eed3ff0f58b0af88937fab8a.tar.gz |
2007-11-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34099
* tree-ssa-ccp.c (likely_value): Exclude all but PLUS_EXPR,
MINUS_EXPR and POINTER_PLUS_EXPR from handling as UNDEFINED
if only one operand is undefined.
* gcc.c-torture/execute/pr34099-2.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130289 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index fc40449be8d..19d82563a81 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -582,32 +582,13 @@ likely_value (tree stmt) /* Unary operators are handled with all_undefined_operands. */ case PLUS_EXPR: case MINUS_EXPR: - case MULT_EXPR: case POINTER_PLUS_EXPR: - case TRUNC_DIV_EXPR: - case CEIL_DIV_EXPR: - case FLOOR_DIV_EXPR: - case ROUND_DIV_EXPR: - case TRUNC_MOD_EXPR: - case CEIL_MOD_EXPR: - case FLOOR_MOD_EXPR: - case ROUND_MOD_EXPR: - case RDIV_EXPR: - case EXACT_DIV_EXPR: - case LSHIFT_EXPR: - case RSHIFT_EXPR: - case LROTATE_EXPR: - case RROTATE_EXPR: - case EQ_EXPR: - case NE_EXPR: - case LT_EXPR: - case GT_EXPR: /* Not MIN_EXPR, MAX_EXPR. One VARYING operand may be selected. Not bitwise operators, one VARYING operand may specify the result completely. Not logical operators for the same reason. - Not LE/GE comparisons or unordered comparisons. Not - COMPLEX_EXPR as one VARYING operand makes the result partly - not UNDEFINED. */ + Not COMPLEX_EXPR as one VARYING operand makes the result partly + not UNDEFINED. Not *DIV_EXPR, comparisons and shifts because + the undefined operand may be promoted. */ return UNDEFINED; default: |