Bug 19511 - [4.0 Regression] ICE in in reload_cse_simplify_operands, at postreload.c:391
Summary: [4.0 Regression] ICE in in reload_cse_simplify_operands, at postreload.c:391
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Richard Henderson
URL:
Keywords: build, ice-on-valid-code, ssemmx
Depends on:
Blocks: 19174
  Show dependency treegraph
 
Reported: 2005-01-18 20:15 UTC by Václav Zeman
Modified: 2005-01-20 06:58 UTC (History)
3 users (show)

See Also:
Host:
Target: i386-unknown-freebsd4.10
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-01-19 05:08:48


Attachments
Preprocessed source. (61.00 KB, application/octet-stream)
2005-01-18 20:16 UTC, Václav Zeman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Václav Zeman 2005-01-18 20:15:30 UTC
Error during bootstrap:

wilx@logout:::~/tmp/gcc-head/objdir/gcc> stage1/xgcc -Bstage1/
-B/home/4/wilx/i386-unknown-freebsd4.10/bin/ -c   -O1 -g -fomit-frame-pointer
-DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Werror
-fno-common   -DHAVE_CONFIG_H -I/home/4/wilx/include   -I. -I.
-I../../srcdir/gcc -I../../srcdir/gcc/. -I../../srcdir/gcc/../include
-I../../srcdir/gcc/../libcpp/include  ../../srcdir/gcc/cfgexpand.c -o cfgexpand.o
../../srcdir/gcc/cfgexpand.c: In function 'construct_exit_block':
../../srcdir/gcc/cfgexpand.c:1264: error: insn does not satisfy its constraints:
(insn 373 284 286 35 ../../srcdir/gcc/cfgexpand.c:1258 (set (reg:DI 22 xmm1)
        (const_int 0 [0x0])) 81 {*movdi_2} (nil)
    (nil))
../../srcdir/gcc/cfgexpand.c:1264: internal compiler error: in
reload_cse_simplify_operands, at postreload.c:391
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

wilx@logout:::~/tmp/gcc-head/objdir/gcc> stage1/xgcc -v
Reading specs from /home/4/wilx/lib/gcc/i386-unknown-freebsd4.10/4.0.0/specs
Configured with: ../srcdir/configure --disable-nls
--enable-version-specific-runtime-libs --enable-dwarf2 --with-cpu=pentium3
--with-arch=pentium3 --with-system-zlib --disable-shared --prefix=/home/4/wilx
--enable-languages=c,c++ --disable-sjlj-exceptions --enable-shared=libstdc++
--enable-shared=libobjc --with-gc=zone
Thread model: posix
gcc version 4.0.0 20050118 (experimental)
Comment 1 Václav Zeman 2005-01-18 20:16:38 UTC
Created attachment 7982 [details]
Preprocessed source.
Comment 2 Václav Zeman 2005-01-18 20:26:57 UTC
If -da dumps are of any interest anybody can d/l them from
http://logout.sh.cvut.cz/~wilx/cfgexpand.c.dumps.bz2
Comment 3 Andrew Pinski 2005-01-18 20:50:19 UTC
I have a reduced testcase down to around 160 lines, still reducing.
Comment 4 Andrew Pinski 2005-01-18 21:18:27 UTC
Confirmed, reduced testcase (20 lines :) ):
typedef struct edge_def { long long probability, count; } *edge;
typedef struct VEC_edge { unsigned num; edge *vec; } VEC_edge;
edge make_edge (void);
static inline edge
ei_safe_edge1 (VEC_edge *container, unsigned index)
{
  if (index != (container)->num)
    return (container)->vec[index];
  return 0;
}
void construct_exit_block (VEC_edge *preds)
{
  unsigned index;
  edge e = make_edge ();
  e->count = 0;
  for (index = 0; ei_safe_edge1 (preds, index); index++)
    ;
  e->count = 0;
}
Comment 5 Andrew Pinski 2005-01-18 21:52:01 UTC
(In reply to comment #4)
> Confirmed, reduced testcase (20 lines :) ):
One more thing, the options to reproduce this with a normaly compiled compiler:
-march=pentium3 -O1 -m32
Comment 6 CVS Commits 2005-01-20 06:47:58 UTC
Subject: Bug 19511

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-01-20 06:47:38

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.c i386.h i386.md 

Log message:
	PR target/19511
	* config/i386/i386.c (ix86_preferred_reload_class): Return a proper
	subclass of the input class.
	(ix86_secondary_memory_needed): Always true for cross-MMX classes.
	Always true for cross-SSE1 classes.  Rationalize conditionals.
	* config/i386/i386.h (SSE_CLASS_P, MMX_CLASS_P): Use straight equality.
	* config/i386/i386.md (movsi_1): Add MMX/SSE zeros.  Fix alternatives
	for SSE1.  Don't check TARGET_INTER_UNIT_MOVES.
	(movdi_2): Add MMX/SSE zeros.
	(movdi_1_rex64): Likewise.  Don't check TARGET_INTER_UNIT_MOVES.
	(movsf_1): Don't check TARGET_INTER_UNIT_MOVES.
	(zero_extendsidi2_32, zero_extendsidi2_rex64): Likewise.
	(movsi_1_nointernunit, movdi_1_rex64_nointerunit): Remove.
	(movsf_1_nointerunit, zero_extendsidi2_32_1): Remove.
	(zero_extendsidi2_rex64_1): Remove.
	(MOV0 peephole): Check GENERAL_REG_P.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7195&r2=2.7196
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.782&r2=1.783
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.h.diff?cvsroot=gcc&r1=1.418&r2=1.419
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.607&r2=1.608

Comment 7 Richard Henderson 2005-01-20 06:58:55 UTC
Fixed.