public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz>
To: Jan Hubicka <jh@suse.cz>, rth@redhat.com
Cc: Eric Botcazou <ebotcazou@libertysurf.fr>, gcc@gcc.gnu.org
Subject: Re: Reload bug
Date: Wed, 09 Apr 2003 00:44:00 -0000	[thread overview]
Message-ID: <20030408224144.GF13052@kam.mff.cuni.cz> (raw)
In-Reply-To: <20030408212528.GC11492@kam.mff.cuni.cz>

> > Hello Jan,
> > 
> > I've narrowed down the bug reported as PR optimization/10233, a regression 
> > from GCC 3.2 present on the 3.2 branch since 3.2.1 (but latent on all active 
> > branches), to this patch
> > 
> > Thu Oct 17 17:14:07 CEST 2002  Jan Hubicka  <jh@suse.cz>
> > 
> > 	PR opt/7630
> > 	* reload.c (reload_inner_reg_of_subreg): New argument output;
> > 	(push_reload): Update call.
> > 
> > 
> > We are trying to reload
> > 
> > 	(subreg:SI (reg/v:DI 29 rmm0 [68]) 4)
> > 
> > as the 'in' argument of push_reload.
> > 
> > Before your patch, the compiler correctly detected that the whole register 
> > needs to be reloaded because we can't access the high part of MMX regs.
> 
> How it did detected that?  I believe it is just pessimization masking a
> bug as currently there is no way how to realize that subreg:SI of MMX
> with offset 4 register is not valid (and with offset 0 is).
> 
> Thinking about it again, I think we can rely on HARD_REGNO_NREGS
> and compute how large the inidividular registers really are, but I don't
> think this is used anywhere in the code.
> 
> It should not get recognized earlier than in reload as we should not
> allocate value with subreg undoable in MMX register into MMX register
> (unless rest of insns dictates otherwise).  We've chatted about this
> with Richard

Actually I think the problem is just that the patch has never get into
3.2 line.
The patch is pretty involved:
	* combine.c (simplify_set): Reverse order of ragumetns to
	REG_CANNOT_CHANGE_MODE_P
	* df.c (df_def_record_1): Likewise.
	* recog.c (register_operand): Likewise.
	* simplify-rtx.c (simplify_subreg): Likewise.
	* hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Update use of
	CANNOT_CHANGE_MODE_CLASS.
	* regclass.c (cannot_change_mode_set_regs, invalid_mode_change_p):
	Likewise.
	* reload.c (push_reload): Likewise.
	* alpha.h (CANNOT_CHANGE_MODE_CLASS): Update definition.
	* ia64.h (CANNOT_CHANGE_MODE_CLASS): Update definition.
	* mips.h (CANNOT_CHANGE_MODE_CLASS): Update definition.
	* mips-protos.h (mips_cannot_change_mode_class): Update prototype.
	* mips.c (mips_cannot_change_mode_class): Update.
	* pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Update definition.
	* rs6000.h (CANNOT_CHANGE_MODE_CLASS): Update definition.
	* s390.h (CANNOT_CHANGE_MODE_CLASS): Update definition.
	* sh.h (CANNOT_CHANGE_MODE_CLASS): Update definition.
	* sh-protos.h (sh_cannot_change_mode_class): Update prototype.
	* sh.c (sh_cannot_change_mode_class): Update.
	* i386.h (CANNOT_CHANGE_MODE_CLASS): New.
	* tm.texi (CANNOT_CHANGE_MODE_CLASS): Update documentation.
and I believe that the MMX suport in 3.2 is in so bad shape that I would
simply close the bugreport claiming that 3.3 fixes that.

Honza

  reply	other threads:[~2003-04-08 22:41 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08 18:52 Eric Botcazou
2003-04-08 23:16 ` Jan Hubicka
2003-04-09  0:44   ` Jan Hubicka [this message]
2003-04-09  7:00     ` Eric Botcazou
2003-04-09  3:00   ` Eric Botcazou
2003-04-09  9:49     ` Jan Hubicka
2003-04-09  8:57   ` Eric Botcazou
2003-04-09  9:45     ` Jan Hubicka
2003-04-09  9:50       ` Eric Botcazou
2003-04-09 14:52         ` Jan Hubicka
2003-04-09 18:10           ` Eric Botcazou
2003-04-09 19:15             ` Jan Hubicka
2003-04-10 14:25           ` Eric Botcazou
2003-04-10 16:31             ` Jan Hubicka
2003-04-10 16:35               ` Jan Hubicka
2003-04-10 20:21             ` Eric Botcazou
2003-04-10 20:43               ` Jan Hubicka
2003-04-11 14:44                 ` Eric Botcazou
2003-04-11 17:49                   ` Jan Hubicka
2003-04-11 18:09                   ` Jan Hubicka
2003-04-11 19:01                   ` Jan Hubicka
2003-04-11 19:07                   ` Jan Hubicka
2003-04-12 14:55                     ` Eric Botcazou
2003-04-12 17:45                       ` Jan Hubicka
2003-04-13 19:57                         ` Eric Botcazou
2003-04-13 20:04                           ` Jan Hubicka
2003-04-12 17:55                       ` Make reload to avoid invalid subregs Jan Hubicka
2003-04-17 22:32                         ` Richard Henderson
2003-04-10 20:51               ` Reload bug Dale Johannesen
2003-04-09  9:13 ` Eric Botcazou
2003-04-09 11:25   ` Jan Hubicka
2003-04-09 12:04     ` Eric Botcazou
2003-04-09 18:05       ` Jan Hubicka
2003-04-09 18:26         ` Eric Botcazou
2003-04-09 21:23         ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
1999-09-01  8:40 Andreas Schwab
1999-09-02  0:32 ` Jeffrey A Law
1999-09-02  2:15   ` Andreas Schwab
1999-09-30 18:02     ` Andreas Schwab
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030408224144.GF13052@kam.mff.cuni.cz \
    --to=jh@suse.cz \
    --cc=ebotcazou@libertysurf.fr \
    --cc=gcc@gcc.gnu.org \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).