This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: grokfield miscompiled with -O9
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: grokfield miscompiled with -O9
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 11 Jan 2000 14:26:30 -0800
- Cc: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>, gcc-patches at gcc dot gnu dot org
- References: <orln5y7c0v.fsf@garnize.lsd.ic.unicamp.br> <2435.947602799@upchuck>
On Tue, Jan 11, 2000 at 07:59:59AM -0700, Jeffrey A Law wrote:
> The whole point of that case is to deal with overlaps between the source
> and the dest. In that case you need some kind of scratch register so that
> you do not stomp on your source operand before you're done reading it.
> Right?
No. The bit Alexandre is talking about is
if (!cse_not_expected)
tmp = gen_reg_rtx (QImode);
else
tmp = gen_lowpart (QImode, dest);
I'm moderately surprised that he got better results from disabling this.
> I'd be more interested in fixing the code which pessimizes the code
> by setting the type to one instead of zero. Unfortunately the comment
> doesn't provide information about the reload problem which led to that
> change.
I don't remember details, but I think it was an abort somewhere
under emit_reload_insns. The comment doesn't give details because
I didn't really understand the problem at the time either. It may
well have been fixed in the 10 months since I wrote that code.
As for type 0 vs type 1, type 0 is faster on P1, but they're
about the same on P2.
r~