[Bug target/40470] unable to find a register to spill in class ÂSSE_FIRST_REGÂ
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 17 15:38:00 GMT 2009
------- Comment #3 from hjl dot tools at gmail dot com 2009-06-17 15:38 -------
This fails with gcc 4.5:
[hjl@gnu-6 gcc]$ cat /tmp/pr40470-1.c
#include <nmmintrin.h>
__m128i load (char *);
char *
foo (char *p1, char *p2,
int bmsk, __m128i mask1, __m128i mask2)
{
int len = 0;
__m128i frag1, frag2;
int cmp_s;
if( !p2[0]) return p1;
if( !p1[0] ) return NULL;
frag2 = load (p2);
frag1 = load (p1);
frag2 = _mm_blendv_epi8(frag2, mask2, mask1);
frag1 = _mm_blendv_epi8(frag1, mask2, mask1);
cmp_s = _mm_cmpistrs(frag2, frag1, 0x0c);
if( cmp_s )
__asm("bsfl %[bmsk], %[len]" : [len] "=r" (len) : [bmsk] "r" (bmsk) );
return p1 + len;
}
[hjl@gnu-6 gcc]$ ./xgcc -B./ -O2 -msse4 /tmp/pr40470-1.c -S
/tmp/pr40470-1.c: In function ÂfooÂ:
/tmp/pr40470-1.c:20:1: error: unable to find a register to spill in class
ÂSSE_FIRST_REGÂ
/tmp/pr40470-1.c:20:1: error: this is the insn:
(insn 29 85 31 4 ./include/smmintrin.h:62 (set (reg:V16QI 25 xmm4 [82])
(unspec:V16QI [
(subreg:V16QI (reg/v:V2DI 25 xmm4 [orig:60 frag2 ] [60]) 0)
(reg:V16QI 22 xmm1 [orig:64 D.8182 ] [64])
(reg:V16QI 23 xmm2 [orig:63 D.8183 ] [63])
] 134)) 1797 {sse4_1_pblendvb} (expr_list:REG_DEAD (reg/v:V2DI 25
xmm4 [orig:60 frag2 ] [60])
(nil)))
/tmp/pr40470-1.c:20:1: internal compiler error: in spill_failure, at
reload1.c:2094
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-6 gcc]$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40470
More information about the Gcc-bugs
mailing list