Re: ICE on valid code, cse related

2007-08-01 Thread Ian Lance Taylor
"Pranav Bhandarkar" <[EMAIL PROTECTED]> writes: > Note the REG_EQUAL note of insn 17. cse tries to replace reg:SI 138 > with a constant and because of insn 13, the note becomes (float:SF > (const_int 0)) which in turn cse converts into > > REG_EQUAL (const_double:SF 0 [0x0] 0.0 [0x0.0p+0]) That

Re: ICE on valid code, cse related

2007-08-01 Thread Pranav Bhandarkar
> Who is calling CONST_DOUBLE_LOW on this value? plus_constant calls CONST_DOUBLE_LOW on this value. simplify_binary_operation_1 calls plus_constant ( while trying to simplify PLUS on (const_double:SF 0 [0x0] 0.0 [0x0.0p+0]) & (const_int -2147483648 [0x8000]) ), which in turn calls CONST_DOUBL

Re: ICE on valid code, cse related

2007-08-01 Thread Ian Lance Taylor
"Pranav Bhandarkar" <[EMAIL PROTECTED]> writes: > > Who is calling CONST_DOUBLE_LOW on this value? > plus_constant calls CONST_DOUBLE_LOW on this value. > > simplify_binary_operation_1 calls plus_constant ( while trying to > simplify PLUS on (const_double:SF 0 [0x0] 0.0 [0x0.0p+0]) & (const_int >

Re: ICE on valid code, cse related

2007-08-02 Thread Pranav Bhandarkar
> How can we have a PLUS on a CONST_DOUBLE and a CONST_INT? That does > not make sense, as there is no MODE argument that could make this work > correctly. From your description, MODE must be some integer mode, in > which case it is wrong to be using a CONST_DOUBLE in SFmode. > > (I don't know wh

Re: ICE on valid code, cse related

2007-08-02 Thread Pranav Bhandarkar
> reg:SI 140 is known to have the constant value > (const_int -2147483648 [0x8000])) Wasnt clear maybe in my previous post. reg:SI 140 is known to have this const_int value from a previous copy into it - here (insn 19 17 20 2 /fc3/scratchpad/testcase-min.i:8 (set (reg:SI 140) (const_in

Re: ICE on valid code, cse related

2007-08-02 Thread Ian Lance Taylor
"Pranav Bhandarkar" <[EMAIL PROTECTED]> writes: > > How can we have a PLUS on a CONST_DOUBLE and a CONST_INT? That does > > not make sense, as there is no MODE argument that could make this work > > correctly. From your description, MODE must be some integer mode, in > > which case it is wrong t

Re: ICE on valid code, cse related

2007-08-03 Thread Pranav Bhandarkar
> (reg:SF 139) can hold the value (const_double:SF 0) but (subreg:SI > (reg:SF 139)) should be the value (const_int 0). Perhaps the problem > is how we handle a REG_EQUAL note when the destination of the set is a > SUBREG. (subreg:SI (reg:SF 139), 0) shouldnt be able to hold the value (float:SF (

RE: ICE on valid code, cse related

2007-08-03 Thread Dave Korn
On 02 August 2007 15:00, Ian Lance Taylor wrote: > "Pranav Bhandarkar" <[EMAIL PROTECTED]> writes: > >>> How can we have a PLUS on a CONST_DOUBLE and a CONST_INT? That does >>> not make sense, as there is no MODE argument that could make this work >>> correctly. From your description, MODE must

Re: ICE on valid code, cse related

2007-08-03 Thread Ian Lance Taylor
"Pranav Bhandarkar" <[EMAIL PROTECTED]> writes: > > (reg:SF 139) can hold the value (const_double:SF 0) but (subreg:SI > > (reg:SF 139)) should be the value (const_int 0). Perhaps the problem > > is how we handle a REG_EQUAL note when the destination of the set is a > > SUBREG. > > (subreg:SI (r

Re: ICE on valid code, cse related

2007-08-08 Thread Pranav Bhandarkar
Hi, > Pranav, although there is indeed a bug in the mid-end here, from your point > of view the simple and effective workaround should be to implement a movdi > pattern (and movsf and movdf if you don't have them yet: it's an absolute > requirement to implement movMM for any modes you expect you

Re: ICE on valid code, cse related

2007-08-09 Thread Rask Ingemann Lambertsen
On Fri, Aug 03, 2007 at 03:49:32PM +0100, Dave Korn wrote: > > Yes, absolutely so, we already know that there are problems there. For > references, see the threads "Deep CSE bug!"[*] and "Bogus REG_EQUIV note > generation"[**] (subject line was wrong, should have been REG_EQUAL all along) > fro

RE: ICE on valid code, cse related

2007-08-09 Thread Dave Korn
On 09 August 2007 13:25, Rask Ingemann Lambertsen wrote: > On Fri, Aug 03, 2007 at 03:49:32PM +0100, Dave Korn wrote: >> >> Yes, absolutely so, we already know that there are problems there. For >> references, see the threads "Deep CSE bug!"[*] and "Bogus REG_EQUIV note >> generation"[**] (sub

Re: ICE on valid code, cse related

2007-08-17 Thread Rask Ingemann Lambertsen
On Wed, Aug 01, 2007 at 08:53:53PM +0530, Pranav Bhandarkar wrote: > " internal compiler error: RTL check: expected code 'const_double' and > mode 'VOID', have code 'const_double' and mode 'SF' in plus_constant, > at explow.c:103" [snip] > Regret the rather verbose post. It is not verbose enou

Re: ICE on valid code, cse related

2007-08-17 Thread 'Rask Ingemann Lambertsen'
On Thu, Aug 09, 2007 at 01:32:02PM +0100, Dave Korn wrote: > On 09 August 2007 13:25, Rask Ingemann Lambertsen wrote: > > >All examples so far have had CONST_DOUBLE in the REG_EQUAL note. > > Yes, and? I don't see what you're getting at here. Not necessarily a whole lot, but it's the o

RE: ICE on valid code, cse related

2007-08-17 Thread Dave Korn
On 17 August 2007 17:02, 'Rask Ingemann Lambertsen' wrote: > >What happened to the experiments you described at > http://gcc.gnu.org/ml/gcc/2004-06/msg01178.html>? Emitting a no-op move > of the (set (reg) (reg)) form won't work, but maybe something like > > (insn (use (reg) (expr_list:REG_E

Re: ICE on valid code, cse related

2007-09-17 Thread Rask Ingemann Lambertsen
On Fri, Aug 17, 2007 at 06:02:06PM +0200, Rask Ingemann Lambertsen wrote: >What happened to the experiments you described at > http://gcc.gnu.org/ml/gcc/2004-06/msg01178.html>? Emitting a no-op move > of the (set (reg) (reg)) form won't work, but maybe something like > > (insn (use (reg) (expr