Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-19 Thread Jeff Law
On 05/16/2015 07:55 PM, Hans-Peter Nilsson wrote: On Sat, 16 May 2015, Segher Boessenkool wrote: On Sat, May 16, 2015 at 12:36:38PM -0400, Hans-Peter Nilsson wrote: On Sat, 16 May 2015, Segher Boessenkool wrote: On Fri, May 15, 2015 at 10:40:48PM -0400, Hans-Peter Nilsson wrote: I confess the

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-17 Thread Hans-Peter Nilsson
On Sun, 17 May 2015, Segher Boessenkool wrote: > I used ; it has > a README. I see that doc is a little out of date, I'll update. ("git:" not "http:" for cloning) Thanks, looks useful. Hm, maybe we already mention this in the wiki... > > - add

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-17 Thread Segher Boessenkool
On Sat, May 16, 2015 at 09:55:08PM -0400, Hans-Peter Nilsson wrote: > > With a plus or minus combine would always write it as a mult. > > I don't think any other pass would create this combination. I > > haven't tested it though. > > Ports probably also generate that internally at various RTL > p

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-16 Thread Hans-Peter Nilsson
On Sat, 16 May 2015, Segher Boessenkool wrote: > On Sat, May 16, 2015 at 12:36:38PM -0400, Hans-Peter Nilsson wrote: > > On Sat, 16 May 2015, Segher Boessenkool wrote: > > > On Fri, May 15, 2015 at 10:40:48PM -0400, Hans-Peter Nilsson wrote: > > > > I confess the test-case-"guarded" addi pattern sh

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-16 Thread Segher Boessenkool
On Sat, May 16, 2015 at 12:36:38PM -0400, Hans-Peter Nilsson wrote: > On Sat, 16 May 2015, Segher Boessenkool wrote: > > On Fri, May 15, 2015 at 10:40:48PM -0400, Hans-Peter Nilsson wrote: > > > I confess the test-case-"guarded" addi pattern should have been > > > expressed with a shift in addition

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-16 Thread Hans-Peter Nilsson
On Sat, 16 May 2015, Segher Boessenkool wrote: > On Fri, May 15, 2015 at 10:40:48PM -0400, Hans-Peter Nilsson wrote: > > I confess the test-case-"guarded" addi pattern should have been > > expressed with a shift in addition to the multiplication. > > But they wouldn't ever match so they might very

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-16 Thread Segher Boessenkool
On Fri, May 15, 2015 at 10:40:48PM -0400, Hans-Peter Nilsson wrote: > I confess the test-case-"guarded" addi pattern should have been > expressed with a shift in addition to the multiplication. But they wouldn't ever match so they might very well have bitrotted by now :-( > ("In > addition to" as

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-15 Thread Hans-Peter Nilsson
On Fri, 1 May 2015, Segher Boessenkool wrote: > On Wed, Apr 29, 2015 at 12:03:35PM -0500, Segher Boessenkool wrote: > > On Wed, Apr 29, 2015 at 09:25:21AM +, Kumar, Venkataramanan wrote: > > > diff --git a/gcc/combine.c b/gcc/combine.c > > > index 5c763b4..945abdb 100644 > > > --- a/gcc/combine

RE: [RFC]: Remove Mem/address type assumption in combiner

2015-05-12 Thread Moore, Catherine
> Moore, Catherine > Subject: RE: [RFC]: Remove Mem/address type assumption in combiner > > On Tue, 2015-05-12 at 05:21 +, Kumar, Venkataramanan wrote: > > Hi Steve, > > > > Yes this is expected. As Segher pointed out, we need to change .md > > patterns in target t

RE: [RFC]: Remove Mem/address type assumption in combiner

2015-05-12 Thread Steve Ellcey
On Tue, 2015-05-12 at 05:21 +, Kumar, Venkataramanan wrote: > Hi Steve, > > Yes this is expected. As Segher pointed out, we need to change .md patterns > in > target to be based on shifts instead of mults. > > Regards, > Venkat. Here is my patch to change this. I tested it with the mips-

RE: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Kumar, Venkataramanan
: Segher Boessenkool; Jeff Law (l...@redhat.com); gcc-patches@gcc.gnu.org; maxim.kuvyr...@linaro.org; Matthew Fortune; clm Subject: RE: [RFC]: Remove Mem/address type assumption in combiner On Thu, 2015-05-07 at 11:01 +, Kumar, Venkataramanan wrote: > Hi Segher, > > Thank you I com

RE: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Matthew Fortune
Segher Boessenkool writes: > On Mon, May 11, 2015 at 08:16:41PM +, Matthew Fortune wrote: > > Does this patch effectively change the canonicalization rules? The > > following Still exists in md.texi: > > > > @item > > Within address computations (i.e., inside @code{mem}), a left shift is > > c

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Segher Boessenkool
On Mon, May 11, 2015 at 08:16:41PM +, Matthew Fortune wrote: > Does this patch effectively change the canonicalization rules? The following > Still exists in md.texi: > > @item > Within address computations (i.e., inside @code{mem}), a left shift is > converted into the appropriate multiplicat

RE: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Matthew Fortune
Jeff Law writes: > On 05/11/2015 01:46 PM, Jeff Law wrote: > > On 05/11/2015 01:44 PM, Steve Ellcey wrote: > >> On Mon, 2015-05-11 at 13:22 -0500, Segher Boessenkool wrote: > >>> Hi Steve, > >>> > >>> On Mon, May 11, 2015 at 10:50:02AM -0700, Steve Ellcey wrote: > This patch broke a number of

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Jeff Law
On 05/11/2015 01:46 PM, Jeff Law wrote: On 05/11/2015 01:44 PM, Steve Ellcey wrote: On Mon, 2015-05-11 at 13:22 -0500, Segher Boessenkool wrote: Hi Steve, On Mon, May 11, 2015 at 10:50:02AM -0700, Steve Ellcey wrote: This patch broke a number of MIPS tests, specifically mips32r6 tests that lo

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Jeff Law
On 05/11/2015 01:44 PM, Steve Ellcey wrote: On Mon, 2015-05-11 at 13:22 -0500, Segher Boessenkool wrote: Hi Steve, On Mon, May 11, 2015 at 10:50:02AM -0700, Steve Ellcey wrote: This patch broke a number of MIPS tests, specifically mips32r6 tests that look for the lsa instruction (load scaled a

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Steve Ellcey
On Mon, 2015-05-11 at 13:22 -0500, Segher Boessenkool wrote: > Hi Steve, > > On Mon, May 11, 2015 at 10:50:02AM -0700, Steve Ellcey wrote: > > This patch broke a number of MIPS tests, specifically mips32r6 tests > > that look for the lsa instruction (load scaled address) which shifts one > > regis

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Segher Boessenkool
Hi Steve, On Mon, May 11, 2015 at 10:50:02AM -0700, Steve Ellcey wrote: > This patch broke a number of MIPS tests, specifically mips32r6 tests > that look for the lsa instruction (load scaled address) which shifts one > register and then adds it to a second register. I am not sure if this > needs

RE: [RFC]: Remove Mem/address type assumption in combiner

2015-05-11 Thread Steve Ellcey
On Thu, 2015-05-07 at 11:01 +, Kumar, Venkataramanan wrote: > Hi Segher, > > Thank you I committed as r222874. > Ref: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=222874 > > Regards, > Venkat. Venkat, This patch broke a number of MIPS tests, specifically mips32r6 tests that loo

RE: [RFC]: Remove Mem/address type assumption in combiner

2015-05-07 Thread Kumar, Venkataramanan
Jeff Law (l...@redhat.com); gcc-patches@gcc.gnu.org; maxim.kuvyr...@linaro.org Subject: Re: [RFC]: Remove Mem/address type assumption in combiner On Tue, May 05, 2015 at 04:14:03PM +, Kumar, Venkataramanan wrote: > Hi Segher, > > Thank you for testing the patch and approving it.

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-05 Thread Segher Boessenkool
On Tue, May 05, 2015 at 04:14:03PM +, Kumar, Venkataramanan wrote: > Hi Segher, > > Thank you for testing the patch and approving it. > > Before I commit it, I wanted to check with you on the changelog entry. > > Please find the updated patch with the changelog entry. > I have just removed

RE: [RFC]: Remove Mem/address type assumption in combiner

2015-05-05 Thread Kumar, Venkataramanan
01, 2015 8:48 PM To: Kumar, Venkataramanan Cc: Jeff Law (l...@redhat.com); gcc-patches@gcc.gnu.org; maxim.kuvyr...@linaro.org Subject: Re: [RFC]: Remove Mem/address type assumption in combiner On Wed, Apr 29, 2015 at 12:03:35PM -0500, Segher Boessenkool wrote: > On Wed, Apr 29, 2015 at 09:2

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-05-01 Thread Segher Boessenkool
On Wed, Apr 29, 2015 at 12:03:35PM -0500, Segher Boessenkool wrote: > On Wed, Apr 29, 2015 at 09:25:21AM +, Kumar, Venkataramanan wrote: > > diff --git a/gcc/combine.c b/gcc/combine.c > > index 5c763b4..945abdb 100644 > > --- a/gcc/combine.c > > +++ b/gcc/combine.c > > @@ -7703,8 +7703,6 @@ mak

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-04-29 Thread Jeff Law
On 04/29/2015 03:25 AM, Kumar, Venkataramanan wrote: Hi Jeff/Segher, When we see an RTX code with PLUS or MINUS then it is treated as MEM/address type (we are inside address RTX). Is there any significance on that assumption? I removed this assumption and the test case in the PR 63949 passe

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-04-29 Thread Jeff Law
On 04/29/2015 11:03 AM, Segher Boessenkool wrote: Right. It would be good if you could find out for what targets it matters. The thing is, if a target expects only the patterns as combine used to make them, it will regress (as you've seen on aarch64); but it will regress _silently_. Which isn'

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-04-29 Thread Jeff Law
On 04/29/2015 03:25 AM, Kumar, Venkataramanan wrote: Hi Jeff/Segher, Restarting the discussion on the GCC combiner assumption about Memory/address type. Ref: https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01298.html https://gcc.gnu.org/ml/gcc/2015-04/msg00028.html Regards, Venkat. PS: I am

Re: [RFC]: Remove Mem/address type assumption in combiner

2015-04-29 Thread Segher Boessenkool
Hello Venkat, On Wed, Apr 29, 2015 at 09:25:21AM +, Kumar, Venkataramanan wrote: > diff --git a/gcc/combine.c b/gcc/combine.c > index 5c763b4..945abdb 100644 > --- a/gcc/combine.c > +++ b/gcc/combine.c > @@ -7703,8 +7703,6 @@ make_compound_operation (rtx x, enum rtx_code in_code) > but o

[RFC]: Remove Mem/address type assumption in combiner

2015-04-29 Thread Kumar, Venkataramanan
Hi Jeff/Segher, Restarting the discussion on the GCC combiner assumption about Memory/address type. Ref: https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01298.html https://gcc.gnu.org/ml/gcc/2015-04/msg00028.html While working on the test case in PR 63949, I came across the below code in combin