diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-29 19:10:25 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-29 19:10:25 +0000 |
commit | 1b927e1cb81240f4d6c73eb7cdec45246f6a3c72 (patch) | |
tree | 56e5cd4a6dc56809fa98da6b09135f74ba2ad785 /gcc/tree-ssa-ccp.c | |
parent | 87e27de18fdbc0c21dcbc3108b52cdea8183acad (diff) | |
download | gcc-1b927e1cb81240f4d6c73eb7cdec45246f6a3c72.tar.gz |
2009-01-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r143767
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@143769 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index d0fcf3937a7..ef6890c65c3 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -966,7 +966,6 @@ ccp_fold (gimple stmt) so this should almost always return a simplified RHS. */ tree lhs = gimple_assign_lhs (stmt); tree op0 = gimple_assign_rhs1 (stmt); - tree res; /* Simplify the operand down to a constant. */ if (TREE_CODE (op0) == SSA_NAME) @@ -1002,20 +1001,8 @@ ccp_fold (gimple stmt) return op0; } - res = fold_unary (subcode, gimple_expr_type (stmt), op0); - - /* If the operation was a conversion do _not_ mark a - resulting constant with TREE_OVERFLOW if the original - constant was not. These conversions have implementation - defined behavior and retaining the TREE_OVERFLOW flag - here would confuse later passes such as VRP. */ - if (res - && TREE_CODE (res) == INTEGER_CST - && TREE_CODE (op0) == INTEGER_CST - && CONVERT_EXPR_CODE_P (subcode)) - TREE_OVERFLOW (res) = TREE_OVERFLOW (op0); - - return res; + return fold_unary_ignore_overflow (subcode, + gimple_expr_type (stmt), op0); } case GIMPLE_BINARY_RHS: |