From 7f14bbe68f1fac27349b5154730aeb2e23e97dfa Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 8 Sep 2003 09:23:34 +0200 Subject: toplev.c (rest_of_compilation): Call split_all_insns before regstack if optimizing but not scheduling after reload. * toplev.c (rest_of_compilation): Call split_all_insns before regstack if optimizing but not scheduling after reload. * gcc.c-torture/compile/20030904-1.c: New test. From-SVN: r71203 --- gcc/toplev.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gcc/toplev.c') diff --git a/gcc/toplev.c b/gcc/toplev.c index aa04138..bcc9c50 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2082,6 +2082,23 @@ rest_of_handle_delay_slots (tree decl, rtx insns) static void rest_of_handle_stack_regs (tree decl, rtx insns) { +#if defined (HAVE_ATTR_length) + /* If flow2 creates new instructions which need splitting + and scheduling after reload is not done, they might not be + splitten until final which doesn't allow splitting + if HAVE_ATTR_length. */ +#ifdef INSN_SCHEDULING + if (optimize && !flag_schedule_insns_after_reload) +#else + if (optimize) +#endif + { + timevar_push (TV_SHORTEN_BRANCH); + split_all_insns (1); + timevar_pop (TV_SHORTEN_BRANCH); + } +#endif + timevar_push (TV_REG_STACK); open_dump_file (DFI_stack, decl); -- cgit v1.1