GCC Bugzilla has been upgraded from version 4.4.9 to 5.0rc3. If you see any problem, please report it to bug 64968.
Bug 20342 - [4.0/4.1 regression] ICE in spill_failure, at reload1.c:1872
Summary: [4.0/4.1 regression] ICE in spill_failure, at reload1.c:1872
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Richard Henderson
URL:
Keywords: ice-on-valid-code, ssemmx
Depends on:
Blocks:
 
Reported: 2005-03-06 10:11 UTC by Serge Belyshev
Modified: 2005-04-05 23:02 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-unknown-linux-gnu
Build:
Known to work: 3.4.4
Known to fail: 4.0.0 4.1.0
Last reconfirmed: 2005-04-01 00:33:24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Belyshev 2005-03-06 10:11:27 UTC
------------------------------------------------------------------------------
/* { dg-do assemble { target x86_64-*-* } } */
/* { dg-options "-O2" } */

typedef int vec __attribute__ ((vector_size (8)));

void foo (int j, vec r)
{
  unsigned short *dst;
  
  while (j--)
    *dst = (unsigned long long) __builtin_ia32_por (r, (vec) 0LL);
}
------------------------------------------------------------------------------
gcc -S -O2 fbmmx1.c
fbmmx1.c: In function ‘foo’:
fbmmx1.c:14: error: unable to find a register to spill in class ‘GENERAL_REGS’
fbmmx1.c:14: error: this is the insn:
(insn:HI 31 27 33 2 (set (subreg:V2SI (reg:DI 1 dx [orig:72 D.1471 ] [72]) 0)
        (reg:V2SI 29 mm0 [74])) 920 {*movv2si_internal_rex64} (nil)
    (nil))
fbmmx1.c:14: internal compiler error: in spill_failure, at reload1.c:1872
Comment 1 Serge Belyshev 2005-03-06 10:15:47 UTC
similar program, but with

-typedef int vec __attribute__ ((vector_size (8)));
+typedef int vec __attribute__ ((mode(DI)));

compiles fine with 3.4.4.
Comment 2 Giovanni Bajo 2005-03-06 12:13:41 UTC
this might be a fallout of rth's cleanups.
Comment 3 Serge Belyshev 2005-03-11 21:14:21 UTC
Confirmed.
Comment 4 CVS Commits 2005-04-05 22:53:26 UTC
Subject: Bug 20342

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-04-05 22:53:08

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

Log message:
	PR target/20342
	PR target/20447
	* config/i386/i386.c (print_operand): Handle vector zeros.
	(ix86_split_to_parts): Handle CONST_VECTOR.
	(ix86_hard_regno_mode_ok): Allow MMX modes in general regs.
	(ix86_modes_tieable_p): Use ix86_hard_regno_mode_ok to decide
	what modes to tie for MMX and SSE registers.
	* config/i386/i386.h (MMX_REG_MODE_P): Remove.
	* config/i386/i386.md: Extend move 0 -> xor peephole to apply
	to vector modes as well.
	* config/i386/predicates.md (const0_operand): Handle VOIDmode
	properly as an input mode.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8153&r2=2.8154
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.804&r2=1.805
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.h.diff?cvsroot=gcc&r1=1.425&r2=1.426
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.624&r2=1.625
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/predicates.md.diff?cvsroot=gcc&r1=1.16&r2=1.17

Comment 5 CVS Commits 2005-04-05 22:59:55 UTC
Subject: Bug 20342

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	rth@gcc.gnu.org	2005-04-05 22:59:33

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

Log message:
	PR target/20342
	PR target/20447
	* config/i386/i386.c (print_operand): Handle vector zeros.
	(ix86_split_to_parts): Handle CONST_VECTOR.
	(ix86_hard_regno_mode_ok): Allow MMX modes in general regs.
	(ix86_modes_tieable_p): Use ix86_hard_regno_mode_ok to decide
	what modes to tie for MMX and SSE registers.
	* config/i386/i386.h (MMX_REG_MODE_P): Remove.
	* config/i386/i386.md: Extend move 0 -> xor peephole to apply
	to vector modes as well.
	* config/i386/predicates.md (const0_operand): Handle VOIDmode
	properly as an input mode.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.128&r2=2.7592.2.129
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.795.6.2&r2=1.795.6.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.421&r2=1.421.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.618&r2=1.618.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/predicates.md.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.16&r2=1.16.10.1

Comment 6 Richard Henderson 2005-04-05 23:02:52 UTC
Fixed.