public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/32711]  New: Regression: ICE when using inline asm constraint "X"
@ 2007-07-09 22:55 scovich at gmail dot com
  2007-07-09 22:59 ` [Bug middle-end/32711] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: scovich at gmail dot com @ 2007-07-09 22:55 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following functions with gcc-4.{1,2,3} results in an ICE.
gcc-3.4.4 does not ICE:

#include <emmintrin.h>
static inline
__m128i my_asm(__m128i a, __m128i b) {
   __m128i result;
   asm("pshufb\t%1,%0" : "=x"(result) : "X"(b), "0"(a));
   return result;
}
__m128i foo(__m128i src) {
  return my_asm(src, _mm_set1_epi32(1));
}

If the inline asm is called directly (not through an inline function) or if the
"X" constraint changes to "mx" everything works fine.


-- 
           Summary: Regression: ICE when using inline asm constraint "X"
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: scovich at gmail dot com
GCC target triplet: x86_64-linux-gnu


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/32711] Regression: ICE when using inline asm constraint "X"
  2007-07-09 22:55 [Bug middle-end/32711] New: Regression: ICE when using inline asm constraint "X" scovich at gmail dot com
@ 2007-07-09 22:59 ` pinskia at gcc dot gnu dot org
  2007-07-09 23:27 ` scovich at gmail dot com
  2007-07-10  6:46 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-09 22:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-07-09 22:59 -------
"X" constraint means anything matches.  Now why we are ICEing is a bit weird.


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/32711] Regression: ICE when using inline asm constraint "X"
  2007-07-09 22:55 [Bug middle-end/32711] New: Regression: ICE when using inline asm constraint "X" scovich at gmail dot com
  2007-07-09 22:59 ` [Bug middle-end/32711] " pinskia at gcc dot gnu dot org
@ 2007-07-09 23:27 ` scovich at gmail dot com
  2007-07-10  6:46 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: scovich at gmail dot com @ 2007-07-09 23:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from scovich at gmail dot com  2007-07-09 23:27 -------
(In reply to comment #1)
> "X" constraint means anything matches.  Now why we are ICEing is a bit weird.

I started using it because "g" doesn't seem to allow xmm references.
Fortunately, "xm" seems to have the desired effect.


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/32711] Regression: ICE when using inline asm constraint "X"
  2007-07-09 22:55 [Bug middle-end/32711] New: Regression: ICE when using inline asm constraint "X" scovich at gmail dot com
  2007-07-09 22:59 ` [Bug middle-end/32711] " pinskia at gcc dot gnu dot org
  2007-07-09 23:27 ` scovich at gmail dot com
@ 2007-07-10  6:46 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ubizjak at gmail dot com @ 2007-07-10  6:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2007-07-10 06:46 -------
(In reply to comment #1)
> "X" constraint means anything matches.  Now why we are ICEing is a bit weird

We hit:

      /* We have patterns that allow zero sets of memory, for instance.
         In 64-bit mode, we should probably support all 8-byte vectors,
         since we can in fact encode that into an immediate.  */
      if (GET_CODE (x) == CONST_VECTOR)
        {
          gcc_assert (x == CONST0_RTX (GET_MODE (x)));
          x = const0_rtx;
        }

It is true that a message would be nice there, but it is also true that X is an
invalid constraint for most (all?) of the instructions.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-10  6:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-09 22:55 [Bug middle-end/32711] New: Regression: ICE when using inline asm constraint "X" scovich at gmail dot com
2007-07-09 22:59 ` [Bug middle-end/32711] " pinskia at gcc dot gnu dot org
2007-07-09 23:27 ` scovich at gmail dot com
2007-07-10  6:46 ` ubizjak at gmail dot com

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).