Bug 14249 - internal compiler error: in push_reload, at reload.c:1315
Summary: internal compiler error: in push_reload, at reload.c:1315
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.3.3
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-02-22 23:12 UTC by Phil Karn
Modified: 2004-05-25 01:55 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Karn 2004-02-22 23:12:44 UTC
When compiling the following program with

gcc -g -O2 -I. -Wall -march=i686 -msse2 -c -o viterbi615_sse2.o viterbi615_sse2.c

I get:

viterbi615_sse2.c: In function `update_viterbi615_blk_sse2':
viterbi615_sse2.c:205: internal compiler error: in push_reload, at reload.c:1315
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

As requested, the preprocessed source is at
http://www.ka9q.net/gcc_bug/viterbi615_sse2.i
Comment 1 Phil Karn 2004-02-22 23:42:07 UTC
The problem is apparently triggered by using __builtin_ia32_psrawi128(). This is
called by the SSE2 SIMD intrinsic _mm_srai_epi16(). If I rewrite my program to
call __builtin_ia32_psrawi128() directly, I get this different error message:

gcc -g -O2 -I. -Wall -march=i686 -msse2 -c -o viterbi615_sse2.o viterbi615_sse2.c
viterbi615_sse2.c: In function `update_viterbi615_blk_sse2':
viterbi615_sse2.c:184: internal compiler error: in ix86_expand_binop_builtin, at
config/i386/i386.c:13140
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 2 Falk Hueffner 2004-02-23 00:08:01 UTC
Confirmed. Here's a test case, can probably be further reduced:

typedef int __v2di __attribute__ ((mode (V2DI)));
typedef int __v8hi __attribute__ ((mode (V8HI)));
 
static __inline __v2di
_mm_sub_epi16 (__v2di __A, __v2di __B)
{            
  return (__v2di) __builtin_ia32_psubw128 ((__v8hi) __A, (__v8hi) __B);
} 
static __inline __v2di
_mm_srai_epi16 (__v2di __A, int __B)
{ 
  return (__v2di) __builtin_ia32_psrawi128 ((__v8hi) __A, __B);
} 
             
void f(__v2di);
void update_viterbi615_blk_sse2 (__v2di *v)
{       
  int i;     
  for (i = 0; i < 1024; i += 2)
    { 
      __v2di decision0, m0, m1;
      m0 = v[i];
      m1 = v[0];
      decision0 = _mm_srai_epi16 (_mm_sub_epi16(m1, m0), 7);
      f(decision0);
    }
}
Comment 3 Andrew Pinski 2004-05-25 01:55:41 UTC
Fixed in 3.4.0 and nobody noticed.