diff options
author | Richard Guenther <rguenther@suse.de> | 2006-06-19 19:48:04 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-06-19 19:48:04 +0000 |
commit | 8112612670aa76350a0bebb09ca12c1bdcc1e8a7 (patch) | |
tree | 3bb9594ee8898fdc95ea54da84761b04e06f3016 /gcc | |
parent | f5938dcd3993e5f8239d67078e6bf292d14dd3d3 (diff) | |
download | gcc-8112612670aa76350a0bebb09ca12c1bdcc1e8a7.zip gcc-8112612670aa76350a0bebb09ca12c1bdcc1e8a7.tar.gz gcc-8112612670aa76350a0bebb09ca12c1bdcc1e8a7.tar.bz2 |
tree-ssa-pre.c (try_combine_conversion): Strip useless type conversions after folding.
2006-06-19 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (try_combine_conversion): Strip useless
type conversions after folding.
From-SVN: r114784
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-pre.c | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 50d8902..81535ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2006-06-19 Richard Guenther <rguenther@suse.de> + * tree-ssa-pre.c (try_combine_conversion): Strip useless + type conversions after folding. + +2006-06-19 Richard Guenther <rguenther@suse.de> + * ggc-page.c (extra_order_size_tab): Add entries with size of struct function and basic_block. (size_lookup): Extend to cover sizes up to 511. diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 7ae481b..54c6eb3 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -3330,12 +3330,17 @@ try_combine_conversion (tree *expr_p) t = fold_unary (TREE_CODE (expr), TREE_TYPE (expr), VALUE_HANDLE_EXPR_SET (TREE_OPERAND (expr, 0))->head->expr); + if (!t) + return false; + + /* Strip useless type conversions, which is safe in the optimizers but + not generally in fold. */ + STRIP_USELESS_TYPE_CONVERSION (t); /* Disallow value expressions we have no value number for already, as we would miss a leader for it here. */ - if (t - && !(TREE_CODE (t) == VALUE_HANDLE - || is_gimple_min_invariant (t))) + if (!(TREE_CODE (t) == VALUE_HANDLE + || is_gimple_min_invariant (t))) t = vn_lookup (t, NULL); if (t && t != expr) |