Commit 81126126 by Richard Guenther Committed by Richard Biener

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
parent f5938dcd
2006-06-19 Richard Guenther <rguenther@suse.de> 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 * ggc-page.c (extra_order_size_tab): Add entries with
size of struct function and basic_block. size of struct function and basic_block.
(size_lookup): Extend to cover sizes up to 511. (size_lookup): Extend to cover sizes up to 511.
......
...@@ -3330,12 +3330,17 @@ try_combine_conversion (tree *expr_p) ...@@ -3330,12 +3330,17 @@ try_combine_conversion (tree *expr_p)
t = fold_unary (TREE_CODE (expr), TREE_TYPE (expr), t = fold_unary (TREE_CODE (expr), TREE_TYPE (expr),
VALUE_HANDLE_EXPR_SET (TREE_OPERAND (expr, 0))->head->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 /* Disallow value expressions we have no value number for already, as
we would miss a leader for it here. */ we would miss a leader for it here. */
if (t if (!(TREE_CODE (t) == VALUE_HANDLE
&& !(TREE_CODE (t) == VALUE_HANDLE || is_gimple_min_invariant (t)))
|| is_gimple_min_invariant (t)))
t = vn_lookup (t, NULL); t = vn_lookup (t, NULL);
if (t && t != expr) if (t && t != expr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment