public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra
@ 2003-07-30  0:10 gcc-bugzilla at gcc dot gnu dot org
  2003-07-30  0:40 ` [Bug c/11718] " warp-spam+gccbz at babylon dot d2dc dot net
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2003-07-30  0:10 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718

           Summary: ICE on valid code with SSE and -fnew-ra
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: warp at babylon dot d2dc dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu

	When toying with the GCC support for SSE, I encountered a
	lovely ICE when I attempted to insert a simple debug line, it
	does not happen if the fprintf in the code below is removed.

	It also does not happen if I do not use -fnew-ra.

	The complete gcc commandline was:
	gcc -Wall -Winline -Wcast-qual -Wsign-compare -W -Werror -march=athlon-xp -O2 -g -fprefetch-loop-arrays -fnew-ra -save-temps -fno-strict-aliasing -I/usr/include/SDL -D_REENTRANT -c tmp.c

Environment:
System: Linux agamemnon 2.6.0-test2-mm1-a1 #1 Mon Jul 28 23:47:58 EDT 2003 i686 GNU/Linux
Architecture: i686

	
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i386-linux

How-To-Repeat:
	Between the --BEGIN-- and --END-- lines are the contents of the
	tmp.i file, bzip2 -9 compressed and then uuencoded.
	(Mostly because I have no idea how gccbug would react to
	trying to include it in 8 bit.)

	The gcc output is:

(warp@agamemnon)(vc/14)(2003-07-29 08:08pm)
~/src/tmp$ gcc -Wall -Winline -Wcast-qual -Wsign-compare -W -Werror -march=athlon-xp -O2 -g -fprefetch-loop-arrays -fnew-ra -save-temps -fno-strict-aliasing -I/usr/include/SDL -D_REENTRANT -c tmp.c
tmp.c: In function `R_StainBlendTexel':
tmp.c:48: internal compiler error: in remember_web_was_spilled, at ra-build.c:2371
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
(warp@agamemnon)(vc/14)(2003-07-29 08:09pm)
~/src/tmp$

--BEGIN--


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/11718] ICE on valid code with SSE and -fnew-ra
  2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
@ 2003-07-30  0:40 ` warp-spam+gccbz at babylon dot d2dc dot net
  2003-07-30  1:05 ` [Bug c/11718] [new-ra] ICE on valid code with SSE pinskia at physics dot uc dot edu
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: warp-spam+gccbz at babylon dot d2dc dot net @ 2003-07-30  0:40 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718



------- Additional Comments From warp-spam+gccbz at babylon dot d2dc dot net  2003-07-30 00:40 -------
Created an attachment (id=4513)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4513&action=view)
The tmp.i file that gccbug chopped off.

gccbug seemed to chop off the actual test case, so here it is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/11718] [new-ra] ICE on valid code with SSE
  2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
  2003-07-30  0:40 ` [Bug c/11718] " warp-spam+gccbz at babylon dot d2dc dot net
@ 2003-07-30  1:05 ` pinskia at physics dot uc dot edu
  2003-11-30 21:27 ` [Bug optimization/11718] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-30  1:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-30 01:05:43
               date|                            |
            Summary|ICE on valid code with SSE  |[new-ra] ICE on valid code
                   |and -fnew-ra                |with SSE


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-30 01:05 -------
I can confirm this on the mainline (20030729).
Reduced sources:
extern struct _IO_FILE *stderr;
struct _IO_FILE;
int fprintf(struct _IO_FILE*,char *,...);
typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
typedef int __v2si __attribute__ ((__mode__ (__V2SI__)));
typedef int __m128 __attribute__ ((__mode__(__V4SF__)));
typedef int __v4sf __attribute__ ((__mode__(__V4SF__)));
static __inline __m128
_mm_movehl_ps (__m128 __A, __m128 __B)//keep
  { return (__m128) __builtin_ia32_movhlps ((__v4sf)__A, (__v4sf)__B); }
static __inline void
_mm_storel_pi (__m64 *__P, __m128 __A)//keep
  { __builtin_ia32_storelps ((__v2si *)__P, (__v4sf)__A); }
static __inline __m128
_mm_load1_ps (float const *__P)//keep
{
  __v4sf __tmp = __builtin_ia32_loadss (__P);
  return (__m128) __builtin_ia32_shufps (__tmp, __tmp, (((0) << 6) | ((0) << 4) | ((0) << 2) | (0)));
}
static __inline __m128
_mm_load_ps (float const *__P)//keep
  { return (__m128) __builtin_ia32_loadaps (__P); }
static __inline __m128
_mm_set1_ps (float __F) //keep
{
  __v4sf __tmp = __builtin_ia32_loadss (&__F);
  return (__m128) __builtin_ia32_shufps (__tmp, __tmp, (((0) << 6) | ((0) << 4) | ((0) << 2) | (0)));
}
static __inline __m128
_mm_setzero_ps (void)//keep
   { return (__m128) __builtin_ia32_setzerops (); }
static __inline void
_mm_store_ss (float *__P, __m128 __A)//keep
  { __builtin_ia32_storess (__P, (__v4sf)__A); }
typedef float vec4_t[4]; 
typedef signed int Sint32;
int R_StainBlendTexel (Sint32 k, vec4_t c0, vec4_t c1, float *bl)
{
    __m128 vr, vir, ct0, ct1, c, t128;
    float a, r, t;

    r = rand() & 255;
    r *= (1.0f/256.0f);
    vir = _mm_set1_ps (1.0f - r);
    vr = _mm_load1_ps (&r);
    ct0 = _mm_load_ps (c0);
    ct1 = _mm_load_ps (c1);

    c = (ct0 * vr) + (ct1 * vir);
    t128 = _mm_setzero_ps ();
    _mm_movehl_ps (t128, c);
    _mm_store_ss (&t, t128);

    a = (t * k) * (1.0f/256.0f);
    fprintf (stderr, "%f\n", t);
    if (a > 0) {
        __m128 va, via, cur;

        va = _mm_load1_ps (&a);
        via = _mm_set1_ps (1.0 - a);
        cur = _mm_load_ps (bl);
        cur = (c * va) + (cur * via);
        _mm_storel_pi ((__m64 *) bl, cur);
        _mm_movehl_ps (t128, cur);
        _mm_store_ss (&bl[2], t128);
        return 1;
    } else
        return 0;
}


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/11718] [new-ra] ICE on valid code with SSE
  2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
  2003-07-30  0:40 ` [Bug c/11718] " warp-spam+gccbz at babylon dot d2dc dot net
  2003-07-30  1:05 ` [Bug c/11718] [new-ra] ICE on valid code with SSE pinskia at physics dot uc dot edu
@ 2003-11-30 21:27 ` pinskia at gcc dot gnu dot org
  2004-03-24  7:01 ` 1319 at bot dot ru
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-30 21:27 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |matz at suse dot de
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Target Milestone|---                         |3.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/11718] [new-ra] ICE on valid code with SSE
  2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2003-11-30 21:27 ` [Bug optimization/11718] " pinskia at gcc dot gnu dot org
@ 2004-03-24  7:01 ` 1319 at bot dot ru
  2004-03-24 15:46 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: 1319 at bot dot ru @ 2004-03-24  7:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From 1319 at bot dot ru  2004-03-24 07:01 -------
Current new RA cannot compile Andrew's testcase:

cd /home/ssb/tmp/
/usr/local/gcc-RA/bin/gcc -fnew-ra -O1 -S 11718.c
R_StainBlendTexel pass: 1 Web 22 class FLOAT_REGS insn class SSE_REGS
Spill out reg 109 from insn:
(insn 298 132 133 0 (set (reg:SF 109)
        (reg:SF 108)) 63 {*movsf_1_nointerunit} (nil)
    (nil))
R_StainBlendTexel pass: 1 Web 11 class FLOAT_REGS insn class GENERAL_REGS
Spill out reg 84 from insn:
(insn 27 23 293 0 (set (reg:SF 84)
        (mem/u/f:SF (symbol_ref/u:SI ("*.LC1") [flags 0x2]) [0 S4 A32])) 63
{*movsf_1_nointerunit} (nil)
    (expr_list:REG_EQUAL (const_double:SF -2147483648 [0x80000000] 1.0e+0
[0x0.8p+1])
        (nil)))
R_StainBlendTexel pass: 1 Web 8 class GENERAL_REGS insn class SSE_REGS
Spill out reg 77 from insn:
(insn 17 16 18 0 (set (reg:SF 77)
        (float:SF (reg:SI 76))) 131 {*floatsisf2_sse} (insn_list 16 (nil))
    (nil))
11718.c: In function `R_StainBlendTexel':

11718.c:72: internal compiler error: in select_regclass, at ra-build.c:3185
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Compilation exited abnormally with code 1 at Wed Mar 24 09:57:02

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/11718] [new-ra] ICE on valid code with SSE
  2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-03-24  7:01 ` 1319 at bot dot ru
@ 2004-03-24 15:46 ` pinskia at gcc dot gnu dot org
  2004-04-08 21:03 ` 1319 at bot dot ru
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-24 15:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-24 15:46 -------
Thanks Serge Belyshev  for testing the new-ra branch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |NEW
   Last reconfirmed|2003-07-30 01:05:43         |2004-03-24 15:46:34
               date|                            |
            Version|3.3.1                       |new-ra


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/11718] [new-ra] ICE on valid code with SSE
  2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-03-24 15:46 ` pinskia at gcc dot gnu dot org
@ 2004-04-08 21:03 ` 1319 at bot dot ru
  2004-04-08 21:15 ` pinskia at gcc dot gnu dot org
  2005-01-17 15:32 ` [Bug rtl-optimization/11718] " pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: 1319 at bot dot ru @ 2004-04-08 21:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From 1319 at bot dot ru  2004-04-08 21:02 -------
Fixed on new-regalloc-branch from 20040408:

$ /usr/local/gcc-RA/bin/gcc -fnew-ra -O1 -S 11718.c
R_StainBlendTexel pass: 1 Web 22 class FLOAT_REGS insn class SSE_REGS
Spill out reg 109 from insn:
(insn 298 132 133 0 (set (reg:SF 109)
        (reg:SF 108)) 63 {*movsf_1_nointerunit} (nil)
    (nil))
R_StainBlendTexel pass: 1 Web 11 class FLOAT_REGS insn class GENERAL_REGS
Spill out reg 84 from insn:
(insn 27 23 293 0 (set (reg:SF 84)
        (mem/u/f:SF (symbol_ref/u:SI ("*.LC1") [flags 0x2]) [0 S4 A32])) 63
{*movsf_1_nointerunit} (nil)
    (expr_list:REG_EQUAL (const_double:SF -2147483648 [0x80000000] 1.0e+0
[0x0.8p+1])
        (nil)))
R_StainBlendTexel pass: 1 Web 8 class GENERAL_REGS insn class SSE_REGS
Spill out reg 77 from insn:
(insn 17 16 18 0 (set (reg:SF 77)
        (float:SF (reg:SI 76))) 131 {*floatsisf2_sse} (insn_list 16 (nil))
    (nil))
$

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug optimization/11718] [new-ra] ICE on valid code with SSE
  2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-04-08 21:03 ` 1319 at bot dot ru
@ 2004-04-08 21:15 ` pinskia at gcc dot gnu dot org
  2005-01-17 15:32 ` [Bug rtl-optimization/11718] " pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-08 21:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-08 21:15 -------
Changing this one suspended as it is fixed on the new-ra brnach, thanks Serge Belyshev for testing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/11718] [new-ra] ICE on valid code with SSE
  2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-04-08 21:15 ` pinskia at gcc dot gnu dot org
@ 2005-01-17 15:32 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-17 15:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-17 15:25 -------
Closing as wiill not fix as new-ra was removed from the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |RESOLVED
         Resolution|                            |WONTFIX
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11718


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-01-17 15:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-30  0:10 [Bug c/11718] New: ICE on valid code with SSE and -fnew-ra gcc-bugzilla at gcc dot gnu dot org
2003-07-30  0:40 ` [Bug c/11718] " warp-spam+gccbz at babylon dot d2dc dot net
2003-07-30  1:05 ` [Bug c/11718] [new-ra] ICE on valid code with SSE pinskia at physics dot uc dot edu
2003-11-30 21:27 ` [Bug optimization/11718] " pinskia at gcc dot gnu dot org
2004-03-24  7:01 ` 1319 at bot dot ru
2004-03-24 15:46 ` pinskia at gcc dot gnu dot org
2004-04-08 21:03 ` 1319 at bot dot ru
2004-04-08 21:15 ` pinskia at gcc dot gnu dot org
2005-01-17 15:32 ` [Bug rtl-optimization/11718] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).