public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Floating point registers vs. LOAD_EXTEND_OP on alpha
@ 2004-01-18 20:42 Richard Kenner
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Kenner @ 2004-01-18 20:42 UTC (permalink / raw)
  To: rth; +Cc: gcc-patches, gcc

    What we need to do is run some benchmarks and decide if LOAD_EXTEND_OP
    should be removed, or (much more likely) we remove (or obfuscate) the
    bits that claims that we can load SImode values into FP registers.

I'd very strongly recommend the latter.  I've seens lots of other problems
with SImode in FP.

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Floating point registers vs. LOAD_EXTEND_OP on alpha
@ 2004-01-18 18:05 Roger Sayle
  2004-01-18 19:01 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Roger Sayle @ 2004-01-18 18:05 UTC (permalink / raw)
  To: gcc, gcc-patches; +Cc: Joern Rennecke, Richard Henderson


I believe I've managed to diagnose the cause of the current mainline
bootstrap failure on alphaev67-dec-osf5.1 and presumably all alpha
targets.

The failure was triggered by Joern's recent patch to postreload.c:

> 2004-01-16  J"orn Rennecke <joern.rennecke@superh.com>
>
>       PR 11864
>       * postreload.c (reload_cse_simplify_operands): Don't remove
>       implicit extension from LOAD_EXTEND_OP.

which causes a miscompilation of the garbage collection preprocessors,
such that gt-emit-rtl.h generated during stage2 contains garbage, such
that building emit-rtl.o in stage2 fails, terminating the bootstrap.

Running the regression tests from a non-bootstrapped compiler, and
comparing the results to a compiler with the appove patch reverted,
shows five new regressions, all gcc.c-torture/execute/memcpy-bi.c at
different optimization levels.

Comparing the assembly output of compiling memcpy-bi.c at -O3 shows
the following differences:

594a595
>       cvtlq $f2,$f2
716a718
>       cvtlq $f3,$f3
846a849
>       cvtlq $f4,$f4


The patch has eliminated the sign extensions of an integer value held
in the alpha's floating point registers.  Clearly there's some poor
interaction between LOAD_EXTEND_OP and loading integer values into FP
registers.

I'm guesing that in the sequence:

        lds $f2,40($10)
	cvtlq $f2,$f2
	sts $f2,40($9)

the "cvtlq" is actually doing something useful, such that the alpha
backend's definition of LOAD_EXTEND_OP depends upon register allocation?


Hopefully, this analysis is enough for an alpha maintainer to determine
whether Joern needs an additional check in his post-reload patch or if
the alpha backend's LOAD_EXTEND_OP should claim to be extending in these
modes.

Roger
--

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2004-01-26 21:16 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-18 20:42 Floating point registers vs. LOAD_EXTEND_OP on alpha Richard Kenner
  -- strict thread matches above, loose matches on Subject: below --
2004-01-18 18:05 Roger Sayle
2004-01-18 19:01 ` Richard Henderson
2004-01-18 22:29   ` Richard Henderson
2004-01-19 20:33 ` Joern Rennecke
2004-01-19 20:41   ` Richard Henderson
2004-01-20  9:30     ` Richard Sandiford
2004-01-20 17:17       ` Richard Henderson
2004-01-20 19:05         ` Joern Rennecke
2004-01-20 19:21           ` Joern Rennecke
2004-01-26 19:30             ` Eric Botcazou
2004-01-26 19:46               ` Joern Rennecke
2004-01-26 20:06                 ` Gerald Pfeifer
2004-01-26 20:53                   ` Joern Rennecke
2004-01-26 21:16                     ` Eric Botcazou
2004-01-26 21:18                       ` Gabriel Dos Reis
2004-01-26 20:38                 ` Eric Botcazou
2004-01-22  9:49           ` Richard Sandiford
2004-01-22 19:32             ` Richard Henderson
2004-01-19 21:25 ` Joern Rennecke
2004-01-19 21:38   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).