* tree-cfg.c (find_taken_edge): Reject VAL begin NULL.
* tree-ssa-ccp.c (visit_cond_stmt): Don't call find_taken_edge
with VAL being NULL.
From-SVN: r90083
+2004-11-04 Kazu Hirata <kazu@cs.umass.edu>
+
+ * tree-cfg.c (find_taken_edge): Reject VAL begin NULL.
+ * tree-ssa-ccp.c (visit_cond_stmt): Don't call find_taken_edge
+ with VAL being NULL.
+
2004-11-04 Kazu Hirata <kazu@cs.umass.edu>
* cfghooks.c (delete_basic_block): Remove code to truncate
gcc_assert (stmt);
gcc_assert (is_ctrl_stmt (stmt));
+ gcc_assert (val);
/* If VAL is a predicate of the form N RELOP N, where N is an
SSA_NAME, we can usually determine its truth value. */
- if (val && COMPARISON_CLASS_P (val))
+ if (COMPARISON_CLASS_P (val))
val = fold (val);
/* If VAL is not a constant, we can't determine which edge might
be taken. */
- if (val == NULL || !really_constant_p (val))
+ if (!really_constant_p (val))
return NULL;
if (TREE_CODE (stmt) == COND_EXPR)
to the worklist. If no single edge can be determined statically,
return SSA_PROP_VARYING to feed all the outgoing edges to the
propagation engine. */
- *taken_edge_p = find_taken_edge (block, val.const_val);
+ *taken_edge_p = val.const_val ? find_taken_edge (block, val.const_val) : 0;
if (*taken_edge_p)
return SSA_PROP_INTERESTING;
else