This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/36438] New: gcc ICE compiling code with mmx builtin
- From: "davidxl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2008 06:36:20 -0000
- Subject: [Bug rtl-optimization/36438] New: gcc ICE compiling code with mmx builtin
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the following code with latest compiler, got ice:
f.i: In function 'void foo(int __vector__*, int)':
f.i:33: internal compiler error: in trunc_int_for_mode, at explow.c:55
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
// f.i:
typedef unsigned short int16;
typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__));
typedef long long __v1di __attribute__ ((__vector_size__ (8)));
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__,
__artificial__))
_mm_slli_si64 (__m64 __m, int __count)
{
return (__m64) __builtin_ia32_psllqi ((__v1di)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__,
__artificial__))
_mm_set_pi16 (short __w3, short __w2, short __w1, short __w0)
{
return (__m64) __builtin_ia32_vec_init_v4hi (__w0, __w1, __w2, __w3);
}
inline __m64 __attribute__((__always_inline__)) SetS16(int16 a, int16 b, int16
c, int16 d) {
return _mm_set_pi16(d, c, b, a);
}
void foo(__m64* dest, int n) {
__m64 mask = SetS16(0x00FF, 0xFF00, 0x0000, 0x00FF);
for ( int i = 0 ; i < n; ++i ) {
mask = _mm_slli_si64(mask, 8);
mask = _mm_slli_si64(mask, 8);
*dest = mask;
++dest;
}
__builtin_ia32_emms ();
}
--
Summary: gcc ICE compiling code with mmx builtin
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: davidxl at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36438