[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 24 03:47:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930
--- Comment #13 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Kazumoto Kojima from comment #12)
>
> --- a/config/sh/sh-protos.h
> +++ b/config/sh/sh-protos.h
> @@ -198,7 +198,7 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc,
> {
> if (BARRIER_P (result.insn))
> break;
> - if (!NONJUMP_INSN_P (result.insn))
> + if (!NONJUMP_INSN_P (result.insn) && !CALL_P (result.insn))
> continue;
> if (reg_set_p (reg, result.insn))
> {
>
> and it works like as my expectation, though I'm not sure whether it's
> a "right thing" or not.
This would be OK for hardregs (which are clobbered by calls). When working on
pseudos, it's actually OK to ignore calls. Maybe it'd be a good idea to extend
sh_find_set_of_reg to check for call clobbered hardregs only. This will make
the function easier to use.
More information about the Gcc-bugs
mailing list