This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patterns for HImode with predec/preinc on ARM


On Fri, 12 Nov 2004, Richard Earnshaw wrote:

> On Fri, 2004-11-12 at 17:12, Nicolas Pitre wrote:
> > On Fri, 12 Nov 2004, Richard Earnshaw wrote:
> > 
> > > On Thu, 2004-11-11 at 21:23, Nicolas Pitre wrote:
> > > > This patch adds HImode with predec/preinc and writeback addressing for 
> > > > ARM.  This is particularly useful to have with some audio processing 
> > > > algorithms for example.  Currently there are patterns for SImode and 
> > > > QImode but HImode were missing.  Asking permission to commit.
> > > > 
> > > > [date]  Nicolas Pitre <nico@cam.org>
> > > > 
> > > > 	* config/arm/arm.md (strhi_preinc, strhi_predec, loadhi_preinc,
> > > > 	loadhi_predec, loadhisi_preinc, loadhisi_predec): New patterns.
> > > 
> > > I'd rather not.  There shouldn't be any need for special patterns for
> > > these sorts of cases now that the compiler knows about pre/post_modify. 
> > > Instead you should check that arm_legitimate_address accepts these cases
> > > and handle them there.
> > 
> > After inspection of arm_legitimate_address it appears that it should 
> > already handle those cases.
> > 
> > Also if I delete loadsi_preinc for example, then preincrement with 
> > writeback on a ldr isn't generated anymore either.
> > 
> > What am I missing?
> 
> For the cases you are seeing it may be necessary to teach combine how to
> generate them.
> 
> Currently there are only a limited number of passes in the compiler that
> can generate these types of expressions.

So, if a loadsi_preinc and a loadqi_preinc patterns are therefore needed 
at the moment for preinc with writeback to work, what's wrong 
with adding a loadhi_preinc as well?  I absolutely don't have the 
intention of messing up with the combine code, and you really don't want 
me to either.  ;-)


Nicolas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]