Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245, take 2)

2016-03-20 Thread Jakub Jelinek
On Thu, Mar 17, 2016 at 01:32:15PM +, Joern Rennecke wrote: > > Note that during register allocation / reload, REGNO equivalence is > > generally wrong, > as it fails to distinguish between the frame pointer and a hard register that > has the > same regno as the frame pointer which has been

Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245, take 2)

2016-03-19 Thread Bernd Schmidt
On 03/17/2016 12:16 PM, Jakub Jelinek wrote: Thus, I've reverted the patch (kept the testcase), and after some discussions on IRC bootstrapped/regtested on x86_64-linux and i686-linux following version, which right now should change behavior just for the i?86 case and nothing else, so shouldn't

Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245, take 2)

2016-03-19 Thread Jakub Jelinek
On Thu, Mar 17, 2016 at 11:07:03PM +1030, Alan Modra wrote: > On Thu, Mar 17, 2016 at 12:16:58PM +0100, Jakub Jelinek wrote: > > the rs6000 backend for whatever strange reason I haven't understood > > really wants pointer equality instead of REGNO comparison (even when the > > modes match), one

Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245)

2016-03-19 Thread Bernd Schmidt
On 03/16/2016 01:22 PM, Jakub Jelinek wrote: So, this is what we've converged to on IRC and passed bootstrap/regtest on x86_64-linux and i686-linux. Is this ok for trunk? The explanation was a bit confusing at first, but I think this looks reasonable. The assert worries me, but triggering it

[PATCH] Change replace_rtx if from is a REG (PR target/70245)

2016-03-19 Thread Jakub Jelinek
Hi! The following testcase is miscompiled on ia32, because a peephole2 calls replace_rtx trying to replace SImode %ecx with SImode %edx, but replace_rtx (unlike e.g. simplify_replace_rtx or validate_replace_rtx), in addition to modifying the rtxes in place (fine in this case) only does pointer

Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245, take 2)

2016-03-19 Thread Alan Modra
On Thu, Mar 17, 2016 at 12:16:58PM +0100, Jakub Jelinek wrote: > the rs6000 backend for whatever strange reason I haven't understood > really wants pointer equality instead of REGNO comparison (even when the > modes match), one (reg:DI 12) should be replaced, another (reg:DI 12) > should not. By

Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245)

2016-03-19 Thread Segher Boessenkool
On Wed, Mar 16, 2016 at 01:59:29PM +0100, Bernd Schmidt wrote: > On 03/16/2016 01:22 PM, Jakub Jelinek wrote: > >So, this is what we've converged to on IRC and passed bootstrap/regtest > >on x86_64-linux and i686-linux. Is this ok for trunk? > > The explanation was a bit confusing at first, but

[PATCH] Change replace_rtx if from is a REG (PR target/70245, take 2)

2016-03-19 Thread Jakub Jelinek
Hi! On Wed, Mar 16, 2016 at 05:48:33PM -0500, Segher Boessenkool wrote: > On Wed, Mar 16, 2016 at 01:59:29PM +0100, Bernd Schmidt wrote: > > On 03/16/2016 01:22 PM, Jakub Jelinek wrote: > > >So, this is what we've converged to on IRC and passed bootstrap/regtest > > >on x86_64-linux and

Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245, take 2)

2016-03-18 Thread Oleg Endo
On Thu, 2016-03-17 at 12:16 +0100, Jakub Jelinek wrote: > Thus, I've reverted the patch (kept the testcase), and after some > discussions on IRC bootstrapped/regtested on x86_64-linux and i686 > -linux following version, which right now should change behavior just > for the i?86 case and nothing