Commit 6d07016c authored by yb9976's avatar yb9976
Browse files

Loop inversion: Conservatively create loop phis.

This fixes opt/fehler312.c.
parent 2ef53aad
......@@ -357,7 +357,8 @@ static ir_node *search_def_and_create_phis(ir_node *const block, ir_mode *const
for (int i = 0; i < n_cfgpreds; ++i)
in[i] = new_r_Dummy(irg, mode);
ir_node *const phi = new_r_Phi(block, n_cfgpreds, in, mode);
ir_node *const phi = mode == mode_M ? new_r_Phi_loop(block, n_cfgpreds, in)
: new_r_Phi(block, n_cfgpreds, in, mode);
/* Important: always keep block phi list up to date. */
add_Block_phi(block, phi);
DB((dbg, LEVEL_5, "ssa phi creation: link new phi %N to block %N\n", phi, block));
......
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