This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: The "980505-1.c" bug (The Story Continued)
- To: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Subject: Re: The "980505-1.c" bug (The Story Continued)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 10 Jul 1998 23:43:34 -0600
- cc: egcs at cygnus dot com (egcs at cygnus dot com)
- Reply-To: law at cygnus dot com
You're missing a critical piece of understanding.
The references to (reg 23) in the notes of the RETVAL insn are wrong
once CSE changes the code in the libcall block to use the constant
instead of (reg 23) as an argument.
The notes should have been modified during the first CSE pass to refer
to the real arguments used in the libcall sequence.
This is what my patch fixed. The notes in the RETVAL insn are updated
at the same time as the instructions in the libcall sequence itself are
updated.
You briefly touched on this in one of your messages:
The solution that would lead to the best optimisation is by making sure that
the expression list of the call is correct: The constants are put directly
on the stack, so the expression list should say THAT, and not say that register
23 was used.
This is exactly what my patch does.
--
jeff