> 2012-11-05 Uros Bizjak <ubiz...@gmail.com> > Kaz Kojima <kkoj...@gcc.gnu.org> > > PR target/41993 > * mode-switching.c (create_pre_exit): Set return_copy to > last_insn when copy_start is a pseudo reg.
OK, thanks. The number of special cases dealt with in the function is on the verge of making it barely understandable though. Why couldn't a backward scan based only on: /* If the return register is not likely spilled, - as is the case for floating point on SH4 - then it might be set by an arithmetic operation that needs a different mode than the exit block. */ for (j = n_entities - 1; j >= 0; j--) { int e = entity_map[j]; int mode = MODE_NEEDED (e, return_copy); if (mode != num_modes[e] && mode != MODE_EXIT (e)) break; } (with a few shortcuts to speed it up) be sufficient? -- Eric Botcazou