This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Deadly optimization bug (all gcc versions!)


  In message <99081701395000.00901@ns1102.munich.netsurf.de>you write:
  > >try_combine assumes that i2 feeds i3, and i1 feeds i2 and/or i3.
  > >This is clearly not the case here, the the call is in error.
  > >Look for the cause, probably some bogus LOG_LINKS.
  > 
  > Argh, sorry. I did not backscroll far enough, the correct i3,i2,i1 at the
  > beginning are:
:-)  One of fun things about try_combine is it modifies the RTL hunks you
see.  So you have to peek at them as soon as you get into try_combine before
they get modified.


[ ... ]

  > So the feed rules are fulfilled. In the meantime I believe I narrowed it
  > down a bit to this code around line 1740:
  > 
  >   /* If we already got a failure, don't try to do more.  Otherwise,
  >      try to substitute in I1 if we have it.  */
  > 
  >   if (i1 && GET_CODE (newpat) != CLOBBER)
  >     {
  >       /* Before we can do this substitution, we must redo the test done
  >          above (see detailed comments there) that ensures  that I1DEST
  >          isn't mentioned in any SETs in NEWPAT that are field assignments. 
  >  */
  > 
  >       if (! combinable_i3pat (NULL_RTX, &newpat, i1dest, NULL_RTX,
  >                               0, NULL_PTR))
  >         {
  >           undo_all ();
  >           return 0;
  >         }
  > 
  >       n_occurrences = 0;
  >       subst_low_cuid = INSN_CUID (i1);
  >       newpat = subst (newpat, i1dest, i1src, 0, 0);
  >       undobuf.previous_undos = undobuf.undos;
  >     }
  > 
  > 
  > Before the call to subst newpat/i1dest/i1src look like:
[ ... ]
This sounds like we're performing a substitution, then simplification (subst
calls a ton of simplification routines).  I'd bet we botch something in the
simplification process.
jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]