This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Deadly optimization bug (all gcc versions!)
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: Re: Deadly optimization bug (all gcc versions!)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 27 Aug 1999 01:26:11 -0600
- cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, dje at watson dot ibm dot com, veksler at il dot ibm dot com, egcs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
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