public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl dot tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/40470] unable to find a register to spill in class ‘SSE_FIRST_REG’
Date: Wed, 17 Jun 2009 20:34:00 -0000	[thread overview]
Message-ID: <20090617203430.28533.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40470-682@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]



------- Comment #6 from hjl dot tools at gmail dot com  2009-06-17 20:34 -------
(In reply to comment #4)
> Another testcase:
> 
> [hjl@gnu-6 gcc]$ cat /tmp/pr40470-3.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, mask1, mask2);
>   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-3.c -S
> -fno-asynchronous-unwind-tables
> /tmp/pr40470-3.c: In function ‘foo’:
> /tmp/pr40470-3.c:20:1: error: unable to find a register to spill in class
> ‘SSE_FIRST_REG’
> /tmp/pr40470-3.c:20:1: error: this is the insn:
> (insn 30 87 32 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.8164 ] [64])
>                 (reg:V16QI 23 xmm2 [orig:63 D.8165 ] [63])
>             ] 134)) 1791 {*sse4_1_pblendvb} (expr_list:REG_DEAD (reg/v:V2DI 25
> xmm4 [orig:60 frag2 ] [60])
>         (nil)))
> /tmp/pr40470-3.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]$ 

Even with my patch, GCSE removes xmm0 in those patterns and
makes it harder for IRA/reload to handle.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40470


  parent reply	other threads:[~2009-06-17 20:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17  4:42 [Bug target/40470] New: unable to find a register to spill in class ‘SSE_FIRST_REG’ hjl dot tools at gmail dot com
2009-06-17  4:49 ` [Bug target/40470] " hjl dot tools at gmail dot com
2009-06-17 14:16 ` hjl dot tools at gmail dot com
2009-06-17 15:38 ` hjl dot tools at gmail dot com
2009-06-17 20:01 ` hjl dot tools at gmail dot com
2009-06-17 20:14 ` hjl dot tools at gmail dot com
2009-06-17 20:34 ` hjl dot tools at gmail dot com [this message]
2009-06-18 21:12 ` hjl at gcc dot gnu dot org
2009-06-18 21:22 ` hjl at gcc dot gnu dot org
2009-06-18 21:23 ` hjl at gcc dot gnu dot org
2009-06-19 12:55 ` hjl dot tools at gmail dot com
2009-06-19 13:12 ` rguenth at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090617203430.28533.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).