From: Michael Beck Date: Wed, 26 Nov 2008 11:38:27 +0000 (+0000) Subject: - put only Phi nodes into th Phi list X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=2a006a523ee0812e03c919a73aef7821487b7cdb;p=libfirm - put only Phi nodes into th Phi list [r24012] --- diff --git a/ir/lower/lower_dw.c b/ir/lower/lower_dw.c index ccef070ef..4b9412a0b 100644 --- a/ir/lower/lower_dw.c +++ b/ir/lower/lower_dw.c @@ -2150,9 +2150,12 @@ static void lower_Phi(ir_node *phi, ir_mode *mode, lower_env_t *env) { env->entries[idx]->low_word = phi_l = new_rd_Phi(dbg, irg, block, arity, inl, mode_l); env->entries[idx]->high_word = phi_h = new_rd_Phi(dbg, irg, block, arity, inh, mode); - /* Don't forget to link the new Phi nodes into the block! */ - add_Block_phi(block, phi_l); - add_Block_phi(block, phi_h); + /* Don't forget to link the new Phi nodes into the block. + * Beware that some Phis might be optimized away. */ + if (is_Phi(phi_l)) + add_Block_phi(block, phi_l); + if (is_Phi(phi_h)) + add_Block_phi(block, phi_h); if (enq) { /* not yet finished */