setmemsi, movmemsi and post_inc

Jeff Law
Thu Mar 25 14:44:07 GMT 2021

On 3/25/2021 8:21 AM, Stefan Franke wrote:
> Hi there,
> I consider implementing movmemsi/setmemsi for some arch using post_inc. Is
> there a "best practice" for using auto increments in such early stages to
> avoid hickups in cse, gcse, cprop etc.p.p.?

IIRC best practice is not to expose auto-inc until the auto-inc pass as 
earlier passes don't know how to deal with them.  See "Incdec" in the 
developer manual.

I'm also not aware of a target where an autoinc happens in contexts 
other than in a MEM.  So you may run into problems with things that look 
like a simple reg->reg move -- insns 8 and 9 in your example.


More information about the Gcc-help mailing list