From: Michael Beck Date: Mon, 2 Jun 2008 15:05:44 +0000 (+0000) Subject: add missing condition X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=255d92e14e068a599a603cfa5d7ece2c632a40cc;p=libfirm add missing condition [r19942] --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index c991c206d..8dc2c5a1b 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -1276,10 +1276,12 @@ restart: } } if (is_Conv(b)) { - if (get_Conv_strict(n)) - set_Conv_strict(b, 1); - n = b; /* ConvA(ConvB(ConvA(...))) == ConvA(...) */ - DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_CONV); + if (smaller_mode(b_mode, a_mode)) { + if (get_Conv_strict(n)) + set_Conv_strict(b, 1); + n = b; /* ConvA(ConvB(ConvA(...))) == ConvA(...) */ + DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_CONV); + } } } }