From: Matthias Braun Date: Thu, 11 Oct 2007 15:07:03 +0000 (+0000) Subject: move all constlike nodes to right for Cmps X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8a167cb92255528c444b159b3e314b59230cbc90;p=libfirm move all constlike nodes to right for Cmps [r16150] --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index b98c922bf..30551dc41 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -3657,10 +3657,12 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) { */ if (is_Const(right)) { c = right; - } else if (is_Const(left)) { + } else if (is_irn_constlike(left)) { c = left; left = right; right = c; + if(!is_Const(c)) + c = NULL; proj_nr = get_inversed_pnc(proj_nr); changed |= 1;