* gcc-3.3 ICE error using -msse2 -O3 in pentium4-pc-linux-gnu
@ 2003-04-25 1:02 Guillermo Ballester Valor
0 siblings, 0 replies; 3+ messages in thread
From: Guillermo Ballester Valor @ 2003-04-25 1:02 UTC (permalink / raw)
To: gcc
[-- Attachment #1: Type: text/plain, Size: 2259 bytes --]
Hi,
Today I've installed CVS gcc-3.3 compiler and bootstraped OK
I've wrote a code to perform Lucas-Lehmer Test to check whether a Mersenne
number is prime (see http://glucas.sourceforge.net/ ). I'm now writing SSE2
code to be used on Opterons and Pentium4, calling to built_in intrinsic SSE2
libraries. Up to now, it runned OK for both Athlon/gcc-3.2 (using emulated
sse2 code) and Intel C++ compiler with (true SSE2 code).
When I try to use gcc-3.3 compiler then I get the following error, It is not
produced when I supress the -O optimization flag (-01 -O2 and -O3 does the
same) :
gcc-3.3 -S -DHAVE_CONFIG_H -I. -O3 -mcpu=pentium4 -march=pentium4 -msse2
-DNO_HACK_ALIGN -DY_TARGET=0 -DY_AVAL=4 -DY_CACHE_LINE=16 -DY_SECURE
-DY_USE_SSE2 -DY_PENTIUM4 -o radixmm_8.s radixmm_8.c
radixmm_8.c: En la función `radixmm0_8_dif':
radixmm_8.c:361: internal compiler error: in simplify_unary_operation, at
simplify-rtx.c:387
Por favor envíe un reporte completo de `bugs',
con el código preprocesado si es apropiado.
Vea <URL:http://gcc.gnu.org/bugs.html> para más instrucciones.
make: *** [radixmm_8.s] Error 1
gbv@bach:~> gcc-3.3 -v
Leyendo especificaciones de
/usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configurado con: /home/gbv/gcc-3.3/gcc/configure --prefix=/usr/local/gcc-3.3
--program-suffix=-3.3
Modelo de hilos: posix
gcc versión 3.3 20030424 (prerelease)
I was a few lost. I think it is a bug but I didn't know how can I send you an
easy test to show the problem, the resulting radixmm_8.i is unreadable due to
the recursed expansion of large macros.
Fortunately, I've been able to write a small test to show the problem. Again,
Intel C++ compiler runs OK.
gbv@bach:~/glucas/glucas-2.9.1> gcc-3.3 -O3 -mcpu=pentium4 -msse2 sse2test.c
-o sse2test
sse2test.c: En la función `main':
sse2test.c:87: internal compiler error: in simplify_unary_operation, at
simplify-rtx.c:387
Por favor envíe un reporte completo de `bugs',
con el código preprocesado si es apropiado.
Vea <URL:http://gcc.gnu.org/bugs.html> para más instrucciones.
And attached is the offending code
Guillermo.
--
Guillermo Ballester Valor
gbv@oxixares.com
Ogijares, Granada SPAIN
[-- Attachment #2: sse2test.c --]
[-- Type: text/x-csrc, Size: 2461 bytes --]
/*
This is a test for sse2 intrinsic libraries for GCC 3.3
*/
#include <stdlib.h>
#if defined(__ICC)
#include <emmintrin.h>
#else
#include <xmmintrin.h>
#endif
#include <stdio.h>
typedef __m128d Y__M128D;
#define Y_MM_LOAD_PD( _res, _p) _res = _mm_load_pd(_p)
#define Y_MM_LOAD1_PD( _res, _p) _res = _mm_load1_pd(_p)
#define Y_MM_SET_SD( _res, _op) _res = _mm_set_sd( _op)
#define Y_MM_SET1_PD( _res, _op) _res = _mm_set1_pd( _op )
#define Y_MM_STORE_PD( _p, _op) _mm_store_pd( _p, _op)
#define Y_MM_UNPACKHI_PD( _res, _op1, _op2) _res = _mm_unpackhi_pd( _op1, _op2)
#define Y_MM_UNPACKLO_PD( _res, _op1, _op2) _res = _mm_unpacklo_pd( _op1, _op2)
#define Y_MM_ADD_PD( _res, _op1, _op2) _res = _mm_add_pd( _op1, _op2)
#define Y_MM_ADD_SD( _res, _op1, _op2) _res = _mm_add_sd( _op1, _op2)
#define Y_MM_SUB_PD( _res, _op1, _op2) _res = _mm_sub_pd( _op1, _op2)
#define Y_MM_SUB_SD( _res, _op1, _op2) _res = _mm_sub_sd( _op1, _op2)
#define Y_MM_MUL_PD( _res, _op1, _op2) _res = _mm_mul_pd( _op1, _op2)
#define Y_MM_MOV_PD( _res, _op1) _res = _op1
#define Y_MM_SWAP_PD( _res ) _res = _mm_shuffle_pd( _res, _res, 0x01)
# define sse2_muladdsub(_t0,_t1,_f) \
{ \
Y__M128D __ar,__ai,__br, __bi; \
Y_MM_MUL_PD(__br, _t1##i, _f##i); \
Y_MM_MUL_PD(__bi, _t1##i, _f##r); \
Y_MM_MUL_PD(__ar, _t1##r, _f##r); \
Y_MM_MUL_PD(__ai, _t1##r, _f##i); \
Y_MM_SUB_PD(__ar, __ar, __br); \
Y_MM_MOV_PD(__br, _t0##r); \
Y_MM_ADD_PD(__ai, __ai, __bi); \
Y_MM_MOV_PD(__bi, _t0##i); \
Y_MM_ADD_PD(_t0##r, _t0##r, __ar); \
Y_MM_SUB_PD(_t1##r, __br, __ar); \
Y_MM_ADD_PD(_t0##i, _t0##i, __ai); \
Y_MM_SUB_PD(_t1##i, __bi, __ai); \
}
#define double_to_sse2(_t, _s) \
{ \
Y__M128D __aux1, __aux2; \
Y_MM_SET_SD ( __aux1, _s##r);\
Y_MM_SET_SD ( __aux2, _s##i);\
Y_MM_UNPACKLO_PD ( _t, __aux1, __aux2);\
}
int main(int argc, char * argv[])
{
double t0r=0.3 , t0i=0.4 , t1r= (-1.2), t1i= 0.2, twr=1.1, twi=0.9;
Y__M128D xt0r, xt0i, xt1r, xt1i, xtwr, xtwi;
double_to_sse2 ( xt0r, t0);
double_to_sse2 ( xt1r, t1);
double_to_sse2 ( xtwr, tw);
Y_MM_MOV_PD(xt0i, xt0r);
Y_MM_MOV_PD(xt1i, xt1r);
Y_MM_MOV_PD(xtwi, xtwr);
sse2_muladdsub ( xt0, xt1, xtw);
_mm_store_pd ( &t0r, xt0r);
_mm_store_pd ( &t1r, xt0r);
printf("%lf\n",t0r);
return;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gcc-3.3: ICE error using -msse2 -O3 in pentium4-pc-linux-gnu
2003-04-25 2:11 gcc-3.3: " Wolfgang Bangerth
@ 2003-04-25 8:49 ` Guillermo Ballester Valor
0 siblings, 0 replies; 3+ messages in thread
From: Guillermo Ballester Valor @ 2003-04-25 8:49 UTC (permalink / raw)
To: gcc
Hi,
On Friday 25 April 2003 01:52, Wolfgang Bangerth wrote:
> Guillermo,
> the bug you describe is fixed in present mainline gcc (CVS). Since 3.3 is
> almost in freeze now, it is unlikely that it will be fixed for any 3.3.x
> release, since it is not a regression against previous versions (this
> stuff was broken for 3.2.x).
>
Oh, I thought it still could be fixed. Is a pity :-(
> However, if you want, you can still file a bug report for the records. In
> that case, please attach both the .i and the original .c file.
>
I'll do that report today. I also will install the mainline CVS version and
see weekly how it works.
> Thanks
Thanks to all GNU/gcc team.
Guillermo.
--
Guillermo Ballester Valor
gbv@oxixares.com
Ogijares, Granada SPAIN
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gcc-3.3: ICE error using -msse2 -O3 in pentium4-pc-linux-gnu
@ 2003-04-25 2:11 Wolfgang Bangerth
2003-04-25 8:49 ` Guillermo Ballester Valor
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Bangerth @ 2003-04-25 2:11 UTC (permalink / raw)
To: gcc, gbv
Guillermo,
the bug you describe is fixed in present mainline gcc (CVS). Since 3.3 is
almost in freeze now, it is unlikely that it will be fixed for any 3.3.x
release, since it is not a regression against previous versions (this
stuff was broken for 3.2.x).
However, if you want, you can still file a bug report for the records. In
that case, please attach both the .i and the original .c file.
Thanks
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ices.utexas.edu
www: http://www.ices.utexas.edu/~bangerth/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-25 5:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-25 1:02 gcc-3.3 ICE error using -msse2 -O3 in pentium4-pc-linux-gnu Guillermo Ballester Valor
2003-04-25 2:11 gcc-3.3: " Wolfgang Bangerth
2003-04-25 8:49 ` Guillermo Ballester Valor
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).