Commit 29c261eb authored by Michael Beck's avatar Michael Beck
Browse files


 - When moving Stores over Phis we must ensure that the store block
   is different from the Phi-block, otherwise the post-dominance
   did NOT mean we we expect (and a Store is moved from the end of a block
   to its start)

parent ad5de8e2
......@@ -959,11 +959,13 @@ static unsigned optimize_phi(ir_node *phi, walk_env_t *wenv)
return 0;
/* check if the block is post dominated by Phi-block
and has no exception exit */
and has no exception exit. Note that block must be different from
Phi-block, else we would move a Store from end End of a block to its
Start... */
bl_info = get_irn_link(block);
if (bl_info->flags & BLOCK_HAS_EXC)
return 0;
if (! block_postdominates(phi_block, block))
if (block == phi_block || ! block_postdominates(phi_block, block))
return 0;
Supports Markdown
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