[Bug target/97715] [11 Regression] ICE in insn_default_length, at config/i386/i386.md:15325 since r11-4578-gd10f3e900b0377b4

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Nov 4 16:08:05 GMT 2020


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

--- Comment #12 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Qing Zhao from comment #10)
> > On Nov 4, 2020, at 9:45 AM, ubizjak at gmail dot com <gcc-bugzilla@gcc.gnu.org> wrote:
> >> fixed registers should already be excluded from zeroing. 
> >> are ST registers considered FIXED registers when -mno-80387 is specified?
> > 
> > They used to be,
> 
> I used the following in middle end to exclude fixed registers from being
> zeroed:
>       if (fixed_regs[regno])
>         continue;
> So, looks like that ST registers are not included in fixed_regs when
> !TARGET_80387. 
> Is this a bug in gcc?

fixed_regs members are only set with -ffixed-REG, in addition to members,
initialized by the target-dependent initializer. It is not a bug.

> > but now they are cleared from accessible_reg_set.
> > 
> >  /* If the FPU is disabled, disable the registers.  */
> >  if (! (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387))
> >    accessible_reg_set &= ~reg_class_contents[FLOAT_REGS];
> 
> The above means that ST registers are excluded from the accessible_reg_set,
> i.e, they cannot be used in the function body anymore? Then, no need to zero
> them?

Yes. You should exit early from zero_all_st_registers as advised by Jakub in
Comment #3.

> Is this information available to middle end?
> Or I have to delete them from the register set in i386 backend?


More information about the Gcc-bugs mailing list