From: Matthias Braun Date: Fri, 19 Oct 2007 18:13:10 +0000 (+0000) Subject: fix Cmp input normalisation X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=b71da3f004e5d59dbef2381ece98d67dd93cf57e;p=libfirm fix Cmp input normalisation [r16285] --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index ad239d506..428fe2d2d 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -3707,8 +3707,10 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) { * We ignore the case that both are constants * this case should be optimized away. */ - if (is_Const(right)) { - c = right; + if (is_irn_constlike(right) && !(is_Const(left) && !is_Const(right))) { + if(is_Const(right)) { + c = right; + } } else if (is_irn_constlike(left)) { c = left; left = right;