Commit af75a7ea by Daniel Berlin Committed by Daniel Berlin

re PR tree-optimization/17111 (tree check ICE in value_insert_into_set_bitmap on…

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
parent 8b84ead6
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> 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
* fold-const.c (round_up, round_down): Use build_int_cst. * fold-const.c (round_up, round_down): Use build_int_cst.
......
...@@ -629,6 +629,10 @@ set_contains_value (value_set_t set, tree val) ...@@ -629,6 +629,10 @@ set_contains_value (value_set_t set, tree val)
static bool static bool
bitmap_set_contains (bitmap_set_t set, tree expr) 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. */ /* XXX: Bitmapped sets only contain SSA_NAME's for now. */
if (TREE_CODE (expr) != SSA_NAME) if (TREE_CODE (expr) != SSA_NAME)
return false; return false;
...@@ -734,6 +738,7 @@ static void ...@@ -734,6 +738,7 @@ static void
bitmap_value_insert_into_set (bitmap_set_t set, tree expr) bitmap_value_insert_into_set (bitmap_set_t set, tree expr)
{ {
tree val = get_value_handle (expr); tree val = get_value_handle (expr);
if (is_gimple_min_invariant (val)) if (is_gimple_min_invariant (val))
return; return;
...@@ -1701,7 +1706,8 @@ create_value_expr_from (tree expr, basic_block block, vuse_optype vuses) ...@@ -1701,7 +1706,8 @@ create_value_expr_from (tree expr, basic_block block, vuse_optype vuses)
tree val = vn_lookup_or_add (op, vuses); tree val = vn_lookup_or_add (op, vuses);
if (!is_undefined_value (op)) if (!is_undefined_value (op))
value_insert_into_set (EXP_GEN (block), 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; TREE_OPERAND (vexpr, i) = val;
} }
} }
......
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