https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64479
Oleg Endo <olegendo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target|sh3 |sh*-*-* Status|UNCONFIRMED |NEW Last reconfirmed| |2015-01-06 CC| |kkojima at gcc dot gnu.org, | |olegendo at gcc dot gnu.org Summary|wrong optimization |[4.8 Regression][SH] wrong |delayed-branch for SH |optimization delayed-branch Ever confirmed|0 |1 --- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> --- Thanks for pinpointing and reporting this. trunk (GCC 5): OK 4.9 branch: OK 4.8 branch: NG This is a problem of the flaky cbranch optimization in 4.8 in the *cbranch_t splitter code. For some reason, modified_between_p seems to ignore the fact that the T_REG is clobbered in call insns. Thus it thinks that it's OK to extend the T_REG lifetime across a call insn.