From: Michael Beck Date: Thu, 25 Oct 2007 16:25:54 +0000 (+0000) Subject: bugfix: the Op(Phi,Phi) optimization require both Phis in the same block X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=37e955f158f80e93a20caa15d0df952d60a029c5;p=libfirm bugfix: the Op(Phi,Phi) optimization require both Phis in the same block [r16349] --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index d12ed01a9..f0dae40a5 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -1771,8 +1771,12 @@ static ir_node *apply_binop_on_2_phis(ir_node *a, ir_node *b, tarval *(*eval)(ta void **res; ir_node *pred; ir_graph *irg; - int i, n = get_irn_arity(a); + int i, n; + if (get_nodes_block(a) != get_nodes_block(b)) + return NULL; + + n = get_irn_arity(a); NEW_ARR_A(void *, res, n); for (i = 0; i < n; ++i) {