Commit f559ca97 authored by uxcqa's avatar uxcqa

jumpthreading: Assert that Phi nodes have more than one input

Phi nodes with one input occur in degenerate graphs only, but can
"trick" jumpthreading into duplicating blocks with more than one
successor, which is not supported.
parent 7d9251f4
......@@ -439,6 +439,8 @@ static ir_node *find_const_or_confirm(jumpthreading_env_t *env, ir_node *jump,
if (is_Phi(value)) {
assert(get_irn_arity(value) > 1);
/* the Phi has to be in the same Block as the Jmp */
if (get_nodes_block(value) != block)
return NULL;
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