+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.
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;
bitmap_value_insert_into_set (bitmap_set_t set, tree expr)
{
tree val = get_value_handle (expr);
+
if (is_gimple_min_invariant (val))
return;
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;
}
}