This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to fix simplify_subreg ICE


On Tue, 11 Dec 2001, Richard Henderson wrote:

> On Tue, Dec 11, 2001 at 12:54:41PM -0500, Alan Matsuoka wrote:
> > 	* combine.c (combine_simplify_rtx) : Can't simplify 
> > 	cases that use condition codes.
> 
> The code doesn't appear to match either the description or
> the changelog.  What relation does NE have to condition codes?
> 
> 
> r~

Um , this seems to be part of the d10v wierdness.
What happens is that simplify_subreg complains about

(gdb) bt
#0  internal_error (msgid=0x8245240 "Internal compiler error in %s, at %s:%d")
    at ../../devo/gcc/diagnostic.c:1218
#1  0x80b6699 in fancy_abort () at ../../devo/gcc/diagnostic.c:1454
#2  0x8162329 in simplify_subreg (outermode=QImode, op=0x4014cd60, innermode=HImode, byte=1)
    at ../../devo/gcc/simplify-rtx.c:2386
#3  0x81aa5ad in combine_simplify_rtx (x=0x401c74b0, op0_mode=HImode, last=0, in_dest=0)
    at ../../devo/gcc/combine.c:3801
#4  0x81a9e59 in subst (x=0x401c74b0, from=0x4014cd20, to=0x4014cd60, in_dest=0, unique_copy=0)
    at ../../devo/gcc/combine.c:3501
#5  0x81a9dd1 in subst (x=0x4014cdb0, from=0x4014cd20, to=0x4014cd60, in_dest=0, unique_copy=0)
    at ../../devo/gcc/combine.c:3471
#6  0x81a7240 in try_combine (i3=0x401b18a0, i2=0x401b1820, i1=0x0, new_direct_jump_p=0xbfffeee8)
    at ../../devo/gcc/combine.c:1939
#7  0x81a5830 in combine_instructions (f=0x401b12e0, nregs=183) at ../../devo/gcc/combine.c:614
#8  0x8177b97 in rest_of_compilation (decl=0x401a8d24) at ../../devo/gcc/toplev.c:3177
#9  0x811fd07 in output_inline_function (fndecl=0x401a8d24) at ../../devo/gcc/integrate.c:2953
#10 0x81760b7 in wrapup_global_declarations (vec=0x83340b0, len=246) at ../../devo/gcc/toplev.c:2121
#11 0x8176524 in compile_file () at ../../devo/gcc/toplev.c:2298
#12 0x817b4e0 in toplev_main (argc=58, argv=0xbffff054) at ../../devo/gcc/toplev.c:5449
#13 0x400339cb in __libc_start_main (main=0x8095cd0 <main>, argc=58, argv=0xbffff054, 
    init=0x8049278 <_init>, fini=0x822514c <_fini>, rtld_fini=0x4000ae60 <_dl_fini>, 
    stack_end=0xbffff04c) at ../sysdeps/generic/libc-start.c:92
(gdb) f 2
#2  0x8162329 in simplify_subreg (outermode=QImode, op=0x4014cd60, innermode=HImode, byte=1)
    at ../../devo/gcc/simplify-rtx.c:2386
2386	    abort ();
(gdb) l
2381	      || innermode == BLKmode || outermode == BLKmode)
2382	    abort ();
2383	
2384	  if (GET_MODE (op) != innermode
2385	      && GET_MODE (op) != VOIDmode)
2386	    abort ();
2387	
2388	  if (byte % GET_MODE_SIZE (outermode)
2389	      || byte >= GET_MODE_SIZE (innermode))
2390	    abort ();
(gdb) 


where GET_MODE (op) is CCrev. Innermode is HImode.

op is

(ne:CC_REV (reg:CC_REV 35 f0)
    (const_int 0 [0x0]))

It looks like it's trying to simplify this when it can't. Perhaps I didn't
describe the problem correctly. 

Alan Matsuoka
GCC Engineering
Red Hat Canada, Ltd
mailto:alanm@redhat.com Tel: (416) 482-2661 x250 / Fax: (416) 482-6299


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]