Re: [Patch]: Fix PR rtl-optimization/50448

2011-11-05 Thread Georg-Johann Lay
Eric Botcazou wrote: >> PR rtl-optimization/50448 >> * cprop.c (try_replace_reg): Also try to replace uses of FROM that >> appear in SET_DEST. > > OK if it passes testing, with s/addr/dest/ as addr isn't an address at all. Ok, it's here: http://gcc.gnu.org/viewcvs?view=revision&re

Re: [Patch]: Fix PR rtl-optimization/50448

2011-11-05 Thread Eric Botcazou
> PR rtl-optimization/50448 > * cprop.c (try_replace_reg): Also try to replace uses of FROM that > appear in SET_DEST. OK if it passes testing, with s/addr/dest/ as addr isn't an address at all. > IMO the head comment is still misleading because it might give rise to the > assum

Re: [Patch]: Fix PR rtl-optimization/50448

2011-11-05 Thread Georg-Johann Lay
Paolo Bonzini wrote: > On 11/04/2011 09:50 AM, Eric Botcazou wrote: >> + /* If above failed and this is a single set, try to simplify the >> source of >> + the set given our substitution. We could perhaps try this for >> multiple >> + SETs, but it probably won't buy us anything. */ >>

Re: [Patch]: Fix PR rtl-optimization/50448

2011-11-04 Thread Eric Botcazou
> What about > > /* Registers can also appear as uses in SET_DEST if it is a MEM. We >could perhaps try this for multiple SETs, but it probably won't >buy us anything. */ > > ? Fine with me, thanks. -- Eric Botcazou

Re: [Patch]: Fix PR rtl-optimization/50448

2011-11-04 Thread Paolo Bonzini
On 11/04/2011 09:50 AM, Eric Botcazou wrote: + /* If above failed and this is a single set, try to simplify the source of + the set given our substitution. We could perhaps try this for multiple + SETs, but it probably won't buy us anything. */ +rtx addr = simplify_replace_rtx (

Re: [Patch]: Fix PR rtl-optimization/50448

2011-11-04 Thread Eric Botcazou
> Yes, the changelog is wrong indeed. Registers in a SET_DEST memory are > uses, so they are like SET_SRC in this context which is why I think the > patch does belong in try_replace_reg. Georg, what do you think of a > changelog like this: > >Also try to replace uses of FROM that appear in SE

Re: [Patch]: Fix PR rtl-optimization/50448

2011-11-04 Thread Paolo Bonzini
On 11/03/2011 10:21 PM, Eric Botcazou wrote: PR rtl-optimization/50448 >* cprop.c (try_replace_reg): Try to simplify SET_SRC given the >substitution. The whole patch is about SET_DEST though, so I'm a little confused. Yes, the changelog is wrong indeed. Registers in a SET_DEST

Re: [Patch]: Fix PR rtl-optimization/50448

2011-11-03 Thread Eric Botcazou
> PR rtl-optimization/50448 > * cprop.c (try_replace_reg): Try to simplify SET_SRC given the > substitution. The whole patch is about SET_DEST though, so I'm a little confused. And the head comment of try_replace_reg reads: /* Try to replace all non-SET_DEST occurrences of FRO