public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/33369]  New: bad sse assembler emitted
@ 2007-09-09 19:24 marcus at jet dot franken dot de
  2007-09-09 19:25 ` [Bug c/33369] " marcus at jet dot franken dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: marcus at jet dot franken dot de @ 2007-09-09 19:24 UTC (permalink / raw)
  To: gcc-bugs

/home/marcus/projects/gcc/BIN/bin/gcc -m32 -c -O2 -ftree-vectorize -msse3  
painting.i 
/tmp/ccXpPr3E.s: Assembler messages:
/tmp/ccXpPr3E.s:17: Error: missing or invalid immediate expression
`0x4000000040000000400000004' taken as 0
/tmp/ccXpPr3E.s:17: Error: suffix or operands invalid for `pslld'


-- 
           Summary: bad sse assembler emitted
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: marcus at jet dot franken dot de
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: i586-unknown-linux-gnu


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


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

* [Bug c/33369] bad sse assembler emitted
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
@ 2007-09-09 19:25 ` marcus at jet dot franken dot de
  2007-09-10  5:35 ` [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld' ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: marcus at jet dot franken dot de @ 2007-09-09 19:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from marcus at jet dot franken dot de  2007-09-09 19:25 -------
Created an attachment (id=14179)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14179&action=view)
painting.i

testcase


-- 


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
  2007-09-09 19:25 ` [Bug c/33369] " marcus at jet dot franken dot de
@ 2007-09-10  5:35 ` ubizjak at gmail dot com
  2007-09-10  6:33 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2007-09-10  5:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ubizjak at gmail dot com  2007-09-10 05:35 -------
Confirmed.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |target
     Ever Confirmed|0                           |1
   GCC host triplet|x86_64-unknown-linux-gnu    |i686-*-*, x86_64-*-*
 GCC target triplet|i586-unknown-linux-gnu      |i686-*-*, x86_64-*-*
   Last reconfirmed|0000-00-00 00:00:00         |2007-09-10 05:35:48
               date|                            |
            Summary|bad sse assembler emitted   |[4.3 Regression] suffix or
                   |                            |operands invalid for `pslld'


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
  2007-09-09 19:25 ` [Bug c/33369] " marcus at jet dot franken dot de
  2007-09-10  5:35 ` [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld' ubizjak at gmail dot com
@ 2007-09-10  6:33 ` ubizjak at gmail dot com
  2007-09-10  9:10 ` uros at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2007-09-10  6:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2007-09-10 06:32 -------
A 64-bit compiler is required. The problem is, that gcc creates a vector shift
constant for vector shift instruction, without checking if optab can take
vector argument.

This one will also create wrong operand for x86_64:

--cut here--
typedef struct tagPOINT
{
  int x;
  int y;
} POINT;

void
f (POINT * ptBuf)
{
  int i;
  for (i = 0; i < 4; i++)
    {
      ptBuf[i].x = ((ptBuf[i].x) << 4);
      ptBuf[i].y = ((ptBuf[i].y) << 4);
    }
}
--cut here--

When compiling with 32bit compiler, the shift argument is pushed into memory,
but resulting code is still wrong:

        movdqu  (%edx), %xmm0
        movdqa  .LC0, %xmm1
        pslld   %xmm1, %xmm0
        movdqa  %xmm0, (%edx)
        movdqu  16(%edx), %xmm0
        pslld   %xmm1, %xmm0
        movdqa  %xmm0, 16(%edx)

where

.LC0:
        .long   4
        .long   4
        .long   4
        .long   4

This problem is similar or the same as PR22480.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |22480


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
                   ` (2 preceding siblings ...)
  2007-09-10  6:33 ` ubizjak at gmail dot com
@ 2007-09-10  9:10 ` uros at gcc dot gnu dot org
  2007-09-10 12:12 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-09-10  9:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from uros at gcc dot gnu dot org  2007-09-10 09:10 -------
Subject: Bug 33369

Author: uros
Date: Mon Sep 10 09:10:00 2007
New Revision: 128328

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128328
Log:
        PR target/33369
        * gcc/config/i386/sse.md (ashr<mode>3): Change op2 mode to SImode.
        Use 'N' operand constraint for op2.
        (lshr<mode>3): Ditto.
        (ashl<mode>3): Ditto.
        (vec_shl_<mode>): Use const_0_to_255_mul_8_operand predicate for op2.
        (vec_shr_<mode>): Use const_0_to_255_mul_8_operand predicate for op2.

        * gcc/config/i386/i386.c (ix86_expand_builtin) [IX86_BUILTIN_PSLL?128,
        IX86_BUILTIN_PSRA*?128, IX86_BUILTIN_PSRL?128]: Convert op1 to SImode.

testsuite/ChangeLog:

        PR target/33369
        * gcc.dg/vect/pr33369.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr33369.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.md
    trunk/gcc/config/i386/sse.md
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
                   ` (3 preceding siblings ...)
  2007-09-10  9:10 ` uros at gcc dot gnu dot org
@ 2007-09-10 12:12 ` ubizjak at gmail dot com
  2007-09-11 11:50 ` jsm28 at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2007-09-10 12:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ubizjak at gmail dot com  2007-09-10 12:12 -------
Some additional discussion (with the fix to SLP vectorizer in a followup) at
http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00859.html


-- 


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
                   ` (4 preceding siblings ...)
  2007-09-10 12:12 ` ubizjak at gmail dot com
@ 2007-09-11 11:50 ` jsm28 at gcc dot gnu dot org
  2007-09-12  6:52 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2007-09-11 11:50 UTC (permalink / raw)
  To: gcc-bugs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
                   ` (5 preceding siblings ...)
  2007-09-11 11:50 ` jsm28 at gcc dot gnu dot org
@ 2007-09-12  6:52 ` ubizjak at gmail dot com
  2007-09-19  6:20 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2007-09-12  6:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ubizjak at gmail dot com  2007-09-12 06:52 -------
Middle-end was fixed by http://gcc.gnu.org/ml/gcc-cvs/2007-09/msg00406.html


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
                   ` (6 preceding siblings ...)
  2007-09-12  6:52 ` ubizjak at gmail dot com
@ 2007-09-19  6:20 ` ubizjak at gmail dot com
  2007-10-10 10:02 ` uros at gcc dot gnu dot org
  2007-12-03  4:15 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2007-09-19  6:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ubizjak at gmail dot com  2007-09-19 06:20 -------
*** Bug 33482 has been marked as a duplicate of this bug. ***


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dwarak dot rajagopal at amd
                   |                            |dot com


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
                   ` (7 preceding siblings ...)
  2007-09-19  6:20 ` ubizjak at gmail dot com
@ 2007-10-10 10:02 ` uros at gcc dot gnu dot org
  2007-12-03  4:15 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-10-10 10:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from uros at gcc dot gnu dot org  2007-10-10 10:02 -------
Subject: Bug 33369

Author: uros
Date: Wed Oct 10 10:01:53 2007
New Revision: 129201

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129201
Log:
        Backport from mainline:
        2007-09-14  Uros Bizjak  <ubizjak@gmail.com>

        PR target/33438
        * config/i386/i386.md (fmodxf3): Copy operands[2] to temporary
        register when operands[2] equals operands[1].
        (dremxf3): Ditto.

        2007-09-10  Uros Bizjak  <ubizjak@gmail.com>

        PR target/33369
        * gcc/config/i386/sse.md (ashr<mode>3): Change op2 mode to SImode.
        Use 'N' operand constraint for op2.
        (lshr<mode>3): Ditto.
        (ashl<mode>3): Ditto.
        (vec_shl_<mode>): Use const_0_to_255_mul_8_operand predicate for op2.
        (vec_shr_<mode>): Use const_0_to_255_mul_8_operand predicate for op2.

        * gcc/config/i386/i386.c (ix86_expand_builtin) [IX86_BUILTIN_PSLL?128,
        IX86_BUILTIN_PSRA*?128, IX86_BUILTIN_PSRL?128]: Convert op1 to SImode.

testsuite/ChangeLog:

        Backport from mainline:
        2007-09-14  Uros Bizjak  <ubizjak@gmail.com>

        PR target/33438
        * gcc.target/i386/pr33438.c: New test.

        2007-09-10  Uros Bizjak  <ubizjak@gmail.com>

        PR target/33369
        * gcc.dg/vect/pr33369.c: New test.


Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/vect/pr33369.c
      - copied unchanged from r128328,
trunk/gcc/testsuite/gcc.dg/vect/pr33369.c
    branches/gcc-4_2-branch/gcc/testsuite/gcc.target/i386/pr33483.c
      - copied unchanged from r128502,
trunk/gcc/testsuite/gcc.target/i386/pr33483.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/config/i386/i386.c
    branches/gcc-4_2-branch/gcc/config/i386/i386.md
    branches/gcc-4_2-branch/gcc/config/i386/sse.md
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld'
  2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
                   ` (8 preceding siblings ...)
  2007-10-10 10:02 ` uros at gcc dot gnu dot org
@ 2007-12-03  4:15 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-03  4:15 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.0                       |4.2.3


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


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

end of thread, other threads:[~2007-12-03  4:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-09 19:24 [Bug c/33369] New: bad sse assembler emitted marcus at jet dot franken dot de
2007-09-09 19:25 ` [Bug c/33369] " marcus at jet dot franken dot de
2007-09-10  5:35 ` [Bug target/33369] [4.3 Regression] suffix or operands invalid for `pslld' ubizjak at gmail dot com
2007-09-10  6:33 ` ubizjak at gmail dot com
2007-09-10  9:10 ` uros at gcc dot gnu dot org
2007-09-10 12:12 ` ubizjak at gmail dot com
2007-09-11 11:50 ` jsm28 at gcc dot gnu dot org
2007-09-12  6:52 ` ubizjak at gmail dot com
2007-09-19  6:20 ` ubizjak at gmail dot com
2007-10-10 10:02 ` uros at gcc dot gnu dot org
2007-12-03  4:15 ` pinskia at gcc dot gnu dot org

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