From mboxrd@z Thu Jan 1 00:00:00 1970 From: john@feith.com (John Wehle) To: law@cygnus.com Cc: rth@cygnus.com, egcs@cygnus.com Subject: Re: Possible CSE quirk involving SUBREG on the i386 Date: Thu, 02 Jul 1998 00:53:00 -0000 Message-id: <199807020417.AAA03219@jwlab.FEITH.COM> X-SW-Source: 1998-07/msg00072.html > > 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 | | -------------------------------------------------------------------------