Re: [RFC] Tighten memory type assumption in RTL combiner pass.

2015-05-06 Thread Segher Boessenkool
On Wed, May 06, 2015 at 08:32:13AM +0100, Richard Sandiford wrote: > > Alternately, you could find a way to accurately track if we're inside a > > MEM, where we want to canonicalize things slightly differently. Once we > > can accurately track if we're inside a MEM, then we no longer have to >

Re: [RFC] Tighten memory type assumption in RTL combiner pass.

2015-05-06 Thread Richard Sandiford
Jeff Law writes: > On 01/16/2015 12:13 AM, Venkataramanan Kumar wrote: >> >> The below test case which I am working on is from the PR63949 >> >> int subsi_sxth (int a, short i) >> { >>/* { dg-final { scan-assembler "sub\tw\[0-9\]+,.*sxth #?1" } } */ >>return a - ((int)i << 1); >> } >> >

Re: [RFC] Tighten memory type assumption in RTL combiner pass.

2015-04-23 Thread Jeff Law
On 01/16/2015 12:13 AM, Venkataramanan Kumar wrote: The below test case which I am working on is from the PR63949 int subsi_sxth (int a, short i) { /* { dg-final { scan-assembler "sub\tw\[0-9\]+,.*sxth #?1" } } */ return a - ((int)i << 1); } The expression "a - ((int)i << 1)" is not a

Re: [PING] : [RFC] Tighten memory type assumption in RTL combiner pass.

2015-01-22 Thread Venkataramanan Kumar
Thank you Segher, I will send an updated patch for stage 1. regards, Venkat. On 22 January 2015 at 21:46, Segher Boessenkool wrote: > On Thu, Jan 22, 2015 at 07:29:28PM +0530, Venkataramanan Kumar wrote: >> ping. Segher do you any comments from your side. > > I agree combine should not transfor

Re: [PING] : [RFC] Tighten memory type assumption in RTL combiner pass.

2015-01-22 Thread Segher Boessenkool
On Thu, Jan 22, 2015 at 07:29:28PM +0530, Venkataramanan Kumar wrote: > ping. Segher do you any comments from your side. I agree combine should not transform shifts into multiplication (except in addresses, where it is canonical). I haven't looked at the actual patch in detail though, it will hav

[PING] : [RFC] Tighten memory type assumption in RTL combiner pass.

2015-01-22 Thread Venkataramanan Kumar
ping. Segher do you any comments from your side. regards, Venkat. On 14 January 2015 at 16:57, Venkataramanan Kumar wrote: > Hi all, > > When trying to debug GCC combiner pass with the test case in PR63949 > ref https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63949 I came across this > code. > > T

Re: [RFC] Tighten memory type assumption in RTL combiner pass.

2015-01-15 Thread Venkataramanan Kumar
Hi jeff and Richard On 15 January 2015 at 03:10, Jeff Law wrote: > On 01/14/15 04:27, Venkataramanan Kumar wrote: >> >> Hi all, >> >> When trying to debug GCC combiner pass with the test case in PR63949 >> ref https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63949 I came across this >> code. >> >> Th

Re: [RFC] Tighten memory type assumption in RTL combiner pass.

2015-01-14 Thread Richard Henderson
On 01/14/2015 03:27 AM, Venkataramanan Kumar wrote: >next_code = (code == MEM ? MEM >: ((code == PLUS || code == MINUS) > - && SCALAR_INT_MODE_P (mode)) ? MEM > + && SCALAR_INT_MODE_P (mode) > + && (in_code == MEM)) ? MEM >

Re: [RFC] Tighten memory type assumption in RTL combiner pass.

2015-01-14 Thread Jeff Law
On 01/14/15 04:27, Venkataramanan Kumar wrote: Hi all, When trying to debug GCC combiner pass with the test case in PR63949 ref https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63949 I came across this code. This code in "make_compound_operation" assumes that all PLUS and MINUS RTX are "MEM" type f

[RFC] Tighten memory type assumption in RTL combiner pass.

2015-01-14 Thread Venkataramanan Kumar
Hi all, When trying to debug GCC combiner pass with the test case in PR63949 ref https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63949 I came across this code. This code in "make_compound_operation" assumes that all PLUS and MINUS RTX are "MEM" type for scalar int modes and tries to optimize based o