X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Freassoc.c;h=8cfcd8c2ecfed349f15eb90771454c6c2b84fe34;hb=bbc6291b6a4ed4fe5bd8d1c2ddd57f4e6a0c8a74;hp=6fe4a68fdb54aa28019b8a5038eb8e6d151371aa;hpb=83de11435aceb3d0f7e530182cf71545efadf593;p=libfirm diff --git a/ir/opt/reassoc.c b/ir/opt/reassoc.c index 6fe4a68fd..8cfcd8c2e 100644 --- a/ir/opt/reassoc.c +++ b/ir/opt/reassoc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -168,12 +168,13 @@ static int reassoc_Sub(ir_node **in) /* already constant, nothing to do */ return 0; } + mode = get_irn_mode(n); dbi = get_irn_dbg_info(n); /* Beware of SubP(P, Is) */ irn = new_rd_Minus(dbi, current_ir_graph, block, right, rmode); - irn = new_rd_Add(dbi, current_ir_graph, block, left, irn, get_irn_mode(n)); + irn = new_rd_Add(dbi, current_ir_graph, block, left, irn, mode); DBG((dbg, LEVEL_5, "Applied: %n - %n => %n + (-%n)\n", get_Sub_left(n), right, get_Sub_left(n), right));