[Bug c/11718] [new-ra] ICE on valid code with SSE
pinskia at physics dot uc dot edu
gcc-bugzilla@gcc.gnu.org
Wed Jul 30 01:05:00 GMT 2003
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;
}
More information about the Gcc-bugs
mailing list