re PR tree-optimization/17111 (tree check ICE in value_insert_into_set_bitmap on inlining a memcmp-like function)

2004-08-20  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/17111
	* tree-ssa-pre.c (create_value_expr_from): Don't change the types
	of non-value_handles.
	(bitmap_set_contains): All constants are in every set.

From-SVN: r86331
This commit is contained in:
Daniel Berlin 2004-08-20 16:48:00 +00:00 committed by Daniel Berlin
parent 8b84ead6fe
commit af75a7ea82
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2004-08-20 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/17111
* tree-ssa-pre.c (create_value_expr_from): Don't change the types
of non-value_handles.
(bitmap_set_contains): All constants are in every set.
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
* fold-const.c (round_up, round_down): Use build_int_cst.

View File

@ -629,6 +629,10 @@ set_contains_value (value_set_t set, tree val)
static bool
bitmap_set_contains (bitmap_set_t set, tree expr)
{
/* All constants are in every set. */
if (is_gimple_min_invariant (get_value_handle (expr)))
return true;
/* XXX: Bitmapped sets only contain SSA_NAME's for now. */
if (TREE_CODE (expr) != SSA_NAME)
return false;
@ -734,6 +738,7 @@ static void
bitmap_value_insert_into_set (bitmap_set_t set, tree expr)
{
tree val = get_value_handle (expr);
if (is_gimple_min_invariant (val))
return;
@ -1701,7 +1706,8 @@ create_value_expr_from (tree expr, basic_block block, vuse_optype vuses)
tree val = vn_lookup_or_add (op, vuses);
if (!is_undefined_value (op))
value_insert_into_set (EXP_GEN (block), op);
TREE_TYPE (val) = TREE_TYPE (TREE_OPERAND (vexpr, i));
if (TREE_CODE (val) == VALUE_HANDLE)
TREE_TYPE (val) = TREE_TYPE (TREE_OPERAND (vexpr, i));
TREE_OPERAND (vexpr, i) = val;
}
}