From: ceriel Date: Tue, 7 Mar 1989 10:11:24 +0000 (+0000) Subject: bug fix: if a case-statement did not have a default, so that the X-Git-Tag: release-5-5~2523 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=15449606d19e7fbe9a0f8bde6210c96916882696;p=ack.git bug fix: if a case-statement did not have a default, so that the default is the successor of the block containing the CSA/CSB instruction, the branch to the CSA/CSB block was not optimized --- diff --git a/util/ego/bo/bo.c b/util/ego/bo/bo.c index e5819e125..64892c7e9 100644 --- a/util/ego/bo/bo.c +++ b/util/ego/bo/bo.c @@ -25,6 +25,9 @@ #include "../../../h/em_mnem.h" #include "../../../h/em_pseu.h" #include "../../../h/em_spec.h" +#include "../../../h/em_flag.h" + +extern char em_flag[]; #define LP_BLOCKS lp_extend->lpx_ra.lpx_blocks @@ -219,7 +222,9 @@ bo_switch(b) (bra = last_code(b->b_start,TRUE)) != (line_p) 0 && INSTR(bra) == op_bra && (s->b_next == (bblock_p) 0 || - !Lis_elem(s->b_next,s->b_succ))) { + !Lis_elem(s->b_next,s->b_succ) || + ((bra = last_code(s->b_start, TRUE)) != (line_p) 0 && + (em_flag[INSTR(bra)]&EM_FLO) == FLO_T))) { l = last_code(s->b_start,FALSE); if (INSTR(l) == ps_end) { if (PREV(l) == (line_p) 0) return;