From mboxrd@z Thu Jan 1 00:00:00 1970 From: john@feith.com (John Wehle) To: rth@cygnus.com Cc: egcs@cygnus.com, law@cygnus.com Subject: Re: Possible CSE quirk involving SUBREG on the i386 Date: Wed, 01 Jul 1998 20:15:00 -0000 Message-id: <199807011843.OAA02049@jwlab.FEITH.COM> X-SW-Source: 1998-07/msg00059.html > Ho hum. The explanation is simple here -- MODES_TIEABLE_P. > > I believe that we can do slightly better for this; while only > the first four int regs can hold QImode values, all of them > can hold HImode values. > > This happens to cure this exact problem, but the same problem > will occur with unsigned char, and I don't see that we can do > anything about it. Why is there a requirement that MODES_TIEABLE_P be symmetrical? On the i386 a QI mode register is accessible in SI mode so I would think that adding: ((MODE1) == QImode && (MODE2) == SImode) to MODES_TIEABLE_P would be useful. BTW, this change solves the unsigned char problem and survives a bootstrap. I realize that we need to avoid trying to use %esi and %edi in a situation which requires QImode access ... though this seems like a register allocation issue which could be handled separate from CSE and COMBINE. What are the thoughts on refining the definition of MODES_TIEABLE_P so that it can be asymmetric and change: MODES_TIEABLE_P (X, Y) to: MODES_TIEABLE_P (X, Y) && MODES_TIEABLE_P (Y, X) where necessary to prevent the wrong kind of register from being allocated? I known ... things aren't that simple :-) though I welcome being enlightened as to the complexities. -- John ------------------------------------------------------------------------- | Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com | | John Wehle | Fax: 1-215-540-5495 | | -------------------------------------------------------------------------