https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98439

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
I don't think this is a backend bug. The position of split pass in the pass
sequence assumes that no split candidates will be emitted after regstack, as
can be seen from the gate function of the pass_split_for_shorten_branches (aka
split5) pass:

      /* The placement of the splitting that we do for shorten_branches
         depends on whether regstack is used by the target or not.  */
#if HAVE_ATTR_length && !defined (STACK_REGS)
      return true;
#else
      return false;
#endif

However, with INSN_SCHEDULING, the pass_split_before_regstack (aka split4) pass
gets moved before sched2 pass as the pass_data_split_before_sched2 (aka
split3). The assumption here is that sched2 pass won't emit split candidates,
which is apparently not true with -fselective-scheduling2.

Without STACK_REGS, these insns will be split in split5, but it looks to me
that for STACK_REGS targets, split4 pass has to be run when
flag_selective_scheduling2 is in effect.

Reply via email to