On Tue, Jan 15, 2013 at 2:38 PM, Jakub Jelinek <ja...@redhat.com> wrote: > Hi! > > As the following testcase shows, even when stack_realign_drap we might need > to prevent crtl->drap_reg accesses in the bbs considered for > shrink-wrapping, even if reload decides stack realignment isn't needed, the > vDRAP (in the testcase %edi) can be used by the first bbs and initialized > only later on in the prologue. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2013-01-15 Jakub Jelinek <ja...@redhat.com> > > PR target/55940 > * function.c (thread_prologue_and_epilogue_insns): Always > add crtl->drap_reg to set_up_by_prologue.set, even if > stack_realign_drap is false. > > * gcc.dg/pr55940.c: New test. > > --- gcc/function.c.jj 2013-01-11 09:02:55.000000000 +0100 > +++ gcc/function.c 2013-01-15 19:23:20.648826011 +0100 > @@ -6029,7 +6029,7 @@ thread_prologue_and_epilogue_insns (void > if (pic_offset_table_rtx) > add_to_hard_reg_set (&set_up_by_prologue.set, Pmode, > PIC_OFFSET_TABLE_REGNUM); > - if (stack_realign_drap && crtl->drap_reg) > + if (crtl->drap_reg) > add_to_hard_reg_set (&set_up_by_prologue.set, > GET_MODE (crtl->drap_reg), > REGNO (crtl->drap_reg));
Does this cause http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56006 -- H.J.