This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Possible CSE quirk involving SUBREG on the i386
- To: law at cygnus dot com
- Subject: Re: Possible CSE quirk involving SUBREG on the i386
- From: john at feith dot com (John Wehle)
- Date: Thu, 2 Jul 1998 00:17:46 -0400
- cc: rth at cygnus dot com, egcs at cygnus dot com
> > Why is there a requirement that MODES_TIEABLE_P be symmetrical?
> I believe it is related to HARD_REGNO_MODE_OK. See MODES_TIEABLE_P
> in the manual.
I did. :-)
> Basically local-alloc will try to tie two registers together if
> MODES_TIEABLE_P is nonzero for two pseudos.
I noticed that. :-)
> If we tie the pseudos together, they will be allocated into the
> same hard reg -- and if HARD_REGNO_MODE_OK was nonzero for one
> of them, then we lose.
Right, which is why I'm proposing that combine_regs in local-alloc.c
be changed from using:
|| !MODES_TIEABLE_P (GET_MODE (usedreg), GET_MODE (setreg))
to:
|| !MODES_TIEABLE_P (GET_MODE (usedreg), GET_MODE (setreg))
|| !MODES_TIEABLE_P (GET_MODE (setreg), GET_MODE (usedreg))
and then update the manual to allow MODES_TIEABLE_P to be asymmetric.
This allows combine to handle zero extending a QImode register in an
optimal fashion on the i386. Any reason I shouldn't go ahead and submit
a patch for this?
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------