From: Michael Beck Date: Tue, 9 Dec 2008 12:26:37 +0000 (+0000) Subject: - do not move the return out of labeled blocks, this must be still reachable X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=4a1d038968f1e688c51a54c5c14cdd834f8dc784;p=libfirm - do not move the return out of labeled blocks, this must be still reachable [r24450] --- diff --git a/ir/opt/return.c b/ir/opt/return.c index c91b88f6b..ebfb2f3c3 100644 --- a/ir/opt/return.c +++ b/ir/opt/return.c @@ -198,7 +198,8 @@ static int can_move_ret(ir_node *ret) { /* check, that predecessors are Jmps */ n = get_Block_n_cfgpreds(retbl); - if (n <= 1) + /* we cannot move above a labeled block, as this might kill the block */ + if (n <= 1 || has_Block_label(retbl)) return 0; for (i = 0; i < n; ++i) { ir_node *pred = get_Block_cfgpred(retbl, i);