public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/43175]  New: __builtin_ia32_vec_perm_v4si doesn't work with AVX
@ 2010-02-25 14:48 hjl dot tools at gmail dot com
  2010-02-25 14:53 ` [Bug target/43175] " hjl dot tools at gmail dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 14:48 UTC (permalink / raw)
  To: gcc-bugs

On Linux/Intel64,

---
typedef int S;
typedef int V __attribute__((vector_size(16)));
typedef int IV __attribute__((vector_size(16)));
typedef union { S s[4]; V v; } U;

static U i[2], b, c;

extern int memcmp (const void *, const void *, __SIZE_TYPE__);
extern void abort ();

int main()
{
  i[0].s[0] = 0;
  i[0].s[1] = 1;
  i[0].s[2] = 2;
  i[0].s[3] = 3;
  i[0].s[4] = 4;
  i[0].s[5] = 5;
  i[0].s[6] = 6;
  i[0].s[7] = 7;

  b.v = __builtin_ia32_vec_perm_v4si (i[0].v, i[1].v, (IV){4, 1, 2, 3});
  c.s[0] = i[0].s[4];
  c.s[1] = i[0].s[1];
  c.s[2] = i[0].s[2];
  c.s[3] = i[0].s[3];
  __asm__("" : : : "memory");
  if (memcmp (&b, &c, sizeof(c)) != 0)
      abort ();

  return 0;
}
--

aborted with -mavx. You can get Intel AVX SDE from

http://software.intel.com/en-us/avx/

to run it:

[hjl@gnu-6 gcc]$ ./xgcc -B./ -O -mavx /tmp/perm.c
[hjl@gnu-6 gcc]$ ./sde -- ./a.out 
Aborted
[hjl@gnu-6 gcc]$ ./xgcc -B./ -O -mssse3 /tmp/perm.c
[hjl@gnu-6 gcc]$ ./a.out 
[hjl@gnu-6 gcc]$


-- 
           Summary: __builtin_ia32_vec_perm_v4si doesn't work with AVX
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
@ 2010-02-25 14:53 ` hjl dot tools at gmail dot com
  2010-02-25 14:55 ` hjl dot tools at gmail dot com
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 14:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2010-02-25 14:53 -------
Starting program: /export/build/gnu/gcc-avx/build-x86_64-linux/prev-gcc/a.out 

Breakpoint 1, 0x0000003b55c33da0 in abort () from /lib64/libc.so.6
(gdb) f 1
#1  0x0000000000400552 in main () at /tmp/x.c:29
29            abort ();
(gdb) p b
$6 = {s = {0, 0, 0, 0}, v = 0x600920}
(gdb) p c
$7 = {s = {4, 1, 2, 3}, v = 0x600930}
(gdb) disass
Dump of assembler code for function main:
   0x00000000004004a4 <+0>:     sub    $0x8,%rsp
   0x00000000004004a8 <+4>:     movl   $0x0,0x20044e(%rip)        # 0x600900
<i>
   0x00000000004004b2 <+14>:    movl   $0x1,0x200448(%rip)        # 0x600904
<i+4>
   0x00000000004004bc <+24>:    movl   $0x2,0x200442(%rip)        # 0x600908
<i+8>
   0x00000000004004c6 <+34>:    movl   $0x3,0x20043c(%rip)        # 0x60090c
<i+12>
   0x00000000004004d0 <+44>:    movl   $0x4,0x200436(%rip)        # 0x600910
<i+16>
   0x00000000004004da <+54>:    movl   $0x5,0x200430(%rip)        # 0x600914
<i+20>
   0x00000000004004e4 <+64>:    movl   $0x6,0x20042a(%rip)        # 0x600918
<i+24>
   0x00000000004004ee <+74>:    movl   $0x7,0x200424(%rip)        # 0x60091c
<i+28>
   0x00000000004004f8 <+84>:    vpxor  %xmm0,%xmm0,%xmm0
   0x00000000004004fc <+88>:    vpblendw $0x3,%xmm0,%xmm0,%xmm0
   0x0000000000400502 <+94>:    vmovdqa %xmm0,0x200416(%rip)        # 0x600920
<b>
   0x000000000040050a <+102>:   movl   $0x4,0x20041c(%rip)        # 0x600930
<c>---Type <return> to continue, or q <return> to quit---

   0x0000000000400514 <+112>:   movl   $0x1,0x200416(%rip)        # 0x600934
<c+4>
   0x000000000040051e <+122>:   movl   $0x2,0x200410(%rip)        # 0x600938
<c+8>
   0x0000000000400528 <+132>:   movl   $0x3,0x20040a(%rip)        # 0x60093c
<c+12>
   0x0000000000400532 <+142>:   mov    $0x600920,%esi
   0x0000000000400537 <+147>:   mov    $0x600930,%edi
   0x000000000040053c <+152>:   mov    $0x10,%ecx
   0x0000000000400541 <+157>:   repz cmpsb %es:(%rdi),%ds:(%rsi)
   0x0000000000400543 <+159>:   seta   %dl
   0x0000000000400546 <+162>:   setb   %al
   0x0000000000400549 <+165>:   cmp    %al,%dl
   0x000000000040054b <+167>:   je     0x400552 <main+174>
   0x000000000040054d <+169>:   callq  0x4003a0 <abort@plt>
=> 0x0000000000400552 <+174>:   mov    $0x0,%eax
   0x0000000000400557 <+179>:   add    $0x8,%rsp
   0x000000000040055b <+183>:   retq   
End of assembler dump.
(gdb) 


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
  2010-02-25 14:53 ` [Bug target/43175] " hjl dot tools at gmail dot com
@ 2010-02-25 14:55 ` hjl dot tools at gmail dot com
  2010-02-25 15:07 ` hjl dot tools at gmail dot com
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 14:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl dot tools at gmail dot com  2010-02-25 14:55 -------
This code:

   0x00000000004004f8 <+84>:    vpxor  %xmm0,%xmm0,%xmm0
   0x00000000004004fc <+88>:    vpblendw $0x3,%xmm0,%xmm0,%xmm0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   0x0000000000400502 <+94>:    vmovdqa %xmm0,0x200416(%rip)

is wrong. 


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
  2010-02-25 14:53 ` [Bug target/43175] " hjl dot tools at gmail dot com
  2010-02-25 14:55 ` hjl dot tools at gmail dot com
@ 2010-02-25 15:07 ` hjl dot tools at gmail dot com
  2010-02-25 15:10 ` ubizjak at gmail dot com
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 15:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2010-02-25 15:06 -------
We expand

D.3242_4 = __builtin_ia32_vec_perm_v4si (D.3241_3, D.3240_2, { 4, 1, 2, 3 });

into

(insn 27 24 28 3 x.i:22 (set (subreg:V8HI (reg:V4SI 75) 0)
        (vec_merge:V8HI (subreg:V8HI (reg:V4SI 75) 0)
            (subreg:V8HI (reg:V4SI 75) 0)
            (const_int 3 [0x3]))) -1 (nil))

(insn 28 27 29 3 x.i:22 (set (reg:V4SI 60 [ D.3242 ])
        (reg:V4SI 75)) -1 (nil))

But reg 75 is never set.


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (2 preceding siblings ...)
  2010-02-25 15:07 ` hjl dot tools at gmail dot com
@ 2010-02-25 15:10 ` ubizjak at gmail dot com
  2010-02-25 15:30 ` hjl dot tools at gmail dot com
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2010-02-25 15:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ubizjak at gmail dot com  2010-02-25 15:10 -------
I think that this code:

  i[0].s[0] = 0;
  i[0].s[1] = 1;
  i[0].s[2] = 2;
  i[0].s[3] = 3;
  i[0].s[4] = 4;
  i[0].s[5] = 5;
  i[0].s[6] = 6;
  i[0].s[7] = 7;

is also wrong. You have i[1].s[4].


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (3 preceding siblings ...)
  2010-02-25 15:10 ` ubizjak at gmail dot com
@ 2010-02-25 15:30 ` hjl dot tools at gmail dot com
  2010-02-25 19:01 ` ubizjak at gmail dot com
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 15:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2010-02-25 15:30 -------
(In reply to comment #4)
> I think that this code:
> 
>   i[0].s[0] = 0;
>   i[0].s[1] = 1;
>   i[0].s[2] = 2;
>   i[0].s[3] = 3;
>   i[0].s[4] = 4;
>   i[0].s[5] = 5;
>   i[0].s[6] = 6;
>   i[0].s[7] = 7;
> 
> is also wrong. You have i[1].s[4].
> 

This testcase is extracted out of gcc.target/i386/vperm-v4si-2.c.


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (4 preceding siblings ...)
  2010-02-25 15:30 ` hjl dot tools at gmail dot com
@ 2010-02-25 19:01 ` ubizjak at gmail dot com
  2010-02-25 19:03 ` ubizjak at gmail dot com
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2010-02-25 19:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ubizjak at gmail dot com  2010-02-25 19:01 -------
A blind guess:

Index: i386.c
===================================================================
--- i386.c      (revision 157069)
+++ i386.c      (working copy)
@@ -29144,8 +29144,8 @@ expand_vec_perm_blend (struct expand_vec
     do_subreg:
       vmode = V8HImode;
       target = gen_lowpart (vmode, target);
-      op0 = gen_lowpart (vmode, target);
-      op1 = gen_lowpart (vmode, target);
+      op0 = gen_lowpart (vmode, op0);
+      op1 = gen_lowpart (vmode, op1);
       break;

     default:

H.J., can you please try this patch?


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (5 preceding siblings ...)
  2010-02-25 19:01 ` ubizjak at gmail dot com
@ 2010-02-25 19:03 ` ubizjak at gmail dot com
  2010-02-25 19:25 ` hjl dot tools at gmail dot com
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2010-02-25 19:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ubizjak at gmail dot com  2010-02-25 19:02 -------
(In reply to comment #6)

> H.J., can you please try this patch?

The patch generates this sequence, that looks OK to me:

        movl    $4, i+16(%rip)
        movl    $5, i+20(%rip)
        movl    $6, i+24(%rip)
        movl    $7, i+28(%rip)
        vmovdqa i+16(%rip), %xmm0
        movl    $0, i(%rip)
        movl    $1, i+4(%rip)
        movl    $2, i+8(%rip)
        movl    $3, i+12(%rip)
        vpblendw        $3, i(%rip), %xmm0, %xmm0
        movl    $4, c(%rip)
        movl    $1, c+4(%rip)
        movl    $2, c+8(%rip)
        movl    $3, c+12(%rip)
        vmovdqa %xmm0, b(%rip)

> 


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-02-25 19:02:58
               date|                            |


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (6 preceding siblings ...)
  2010-02-25 19:03 ` ubizjak at gmail dot com
@ 2010-02-25 19:25 ` hjl dot tools at gmail dot com
  2010-02-25 19:34 ` [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1 hjl dot tools at gmail dot com
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 19:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from hjl dot tools at gmail dot com  2010-02-25 19:25 -------
(In reply to comment #6)
> A blind guess:
> 
> Index: i386.c
> ===================================================================
> --- i386.c      (revision 157069)
> +++ i386.c      (working copy)
> @@ -29144,8 +29144,8 @@ expand_vec_perm_blend (struct expand_vec
>      do_subreg:
>        vmode = V8HImode;
>        target = gen_lowpart (vmode, target);
> -      op0 = gen_lowpart (vmode, target);
> -      op1 = gen_lowpart (vmode, target);
> +      op0 = gen_lowpart (vmode, op0);
> +      op1 = gen_lowpart (vmode, op1);
>        break;
> 
>      default:
> 
> H.J., can you please try this patch?
> 

Doesn't work:

(gdb) p b
$1 = {s = {0, 5, 6, 7}, v = 0x600920}
(gdb) p c
$2 = {s = {4, 1, 2, 3}, v = 0x600930}
(gdb) 


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (7 preceding siblings ...)
  2010-02-25 19:25 ` hjl dot tools at gmail dot com
@ 2010-02-25 19:34 ` hjl dot tools at gmail dot com
  2010-02-25 19:44 ` ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from hjl dot tools at gmail dot com  2010-02-25 19:34 -------
The testcase will also fail with -msse4.1:

/export/gnu/import/svn/gcc-test/bld/gcc//xgcc
-B/export/gnu/import/svn/gcc-test/bld/gcc// -O -msse4.1
-fno-asynchronous-unwind-tables    x.c   -o x
./x
make: *** [all] Aborted (core dumped)
[hjl@gnu-1 pr43175]$ 


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|__builtin_ia32_vec_perm_v4si|__builtin_ia32_vec_perm_v4si
                   |doesn't work with AVX       |doesn't work with -msse4.1


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (8 preceding siblings ...)
  2010-02-25 19:34 ` [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1 hjl dot tools at gmail dot com
@ 2010-02-25 19:44 ` ubizjak at gmail dot com
  2010-02-25 19:55 ` hjl dot tools at gmail dot com
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2010-02-25 19:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ubizjak at gmail dot com  2010-02-25 19:44 -------
(In reply to comment #9)
> The testcase will also fail with -msse4.1:

Add this patch (please note that input operands of blend MD patterns are
*reversed*):

@@ -29153,7 +29153,7 @@ expand_vec_perm_blend (struct expand_vec
     }

   /* This matches five different patterns with the different modes.  */
-  x = gen_rtx_VEC_MERGE (vmode, op0, op1, GEN_INT (mask));
+  x = gen_rtx_VEC_MERGE (vmode, op1, op0, GEN_INT (mask));
   x = gen_rtx_SET (VOIDmode, target, x);
   emit_insn (x);



-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (9 preceding siblings ...)
  2010-02-25 19:44 ` ubizjak at gmail dot com
@ 2010-02-25 19:55 ` hjl dot tools at gmail dot com
  2010-02-25 20:12 ` ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from hjl dot tools at gmail dot com  2010-02-25 19:55 -------
(In reply to comment #10)
> (In reply to comment #9)
> > The testcase will also fail with -msse4.1:
> 
> Add this patch (please note that input operands of blend MD patterns are
> *reversed*):
> 
> @@ -29153,7 +29153,7 @@ expand_vec_perm_blend (struct expand_vec
>      }
> 
>    /* This matches five different patterns with the different modes.  */
> -  x = gen_rtx_VEC_MERGE (vmode, op0, op1, GEN_INT (mask));
> +  x = gen_rtx_VEC_MERGE (vmode, op1, op0, GEN_INT (mask));
>    x = gen_rtx_SET (VOIDmode, target, x);
>    emit_insn (x);
> 
> 

That works.  Thanks.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.0


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (10 preceding siblings ...)
  2010-02-25 19:55 ` hjl dot tools at gmail dot com
@ 2010-02-25 20:12 ` ubizjak at gmail dot com
  2010-02-25 20:33 ` hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2010-02-25 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from ubizjak at gmail dot com  2010-02-25 20:11 -------
(In reply to comment #11)

> That works.  Thanks.

Can you please regression test combined patch on your AVX simulator?


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (11 preceding siblings ...)
  2010-02-25 20:12 ` ubizjak at gmail dot com
@ 2010-02-25 20:33 ` hjl dot tools at gmail dot com
  2010-02-25 20:36 ` hjl dot tools at gmail dot com
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 20:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from hjl dot tools at gmail dot com  2010-02-25 20:33 -------
Created an attachment (id=19959)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19959&action=view)
A patch

I am testing this patch. OK for trunk if there are no regressions
on Intel Core i7?


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (12 preceding siblings ...)
  2010-02-25 20:33 ` hjl dot tools at gmail dot com
@ 2010-02-25 20:36 ` hjl dot tools at gmail dot com
  2010-02-25 20:49 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 20:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from hjl dot tools at gmail dot com  2010-02-25 20:36 -------
Created an attachment (id=19960)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19960&action=view)
A patch

Include testcase.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19959|0                           |1
        is obsolete|                            |


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (13 preceding siblings ...)
  2010-02-25 20:36 ` hjl dot tools at gmail dot com
@ 2010-02-25 20:49 ` ubizjak at gmail dot com
  2010-02-26  0:54 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2010-02-25 20:49 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #15 from ubizjak at gmail dot com  2010-02-25 20:49 -------
(In reply to comment #13)
> Created an attachment (id=19959)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19959&action=view) [edit]
> A patch
> 
> I am testing this patch. OK for trunk if there are no regressions
> on Intel Core i7?

I think that following ChangeLog text better describes the change:ž

        PR target/43175
        * config/i386/i386.c (expand_vec_perm_blend): Use correct
        operands in V8HImode subregs.  Fix operand order in VEC_MERGE rtx.

Also, please post patch to gcc-patches@ ML for others to see/comment.


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (14 preceding siblings ...)
  2010-02-25 20:49 ` ubizjak at gmail dot com
@ 2010-02-26  0:54 ` hjl dot tools at gmail dot com
  2010-02-26 13:19 ` hjl at gcc dot gnu dot org
  2010-03-02 13:31 ` hjl dot tools at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-26  0:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from hjl dot tools at gmail dot com  2010-02-26 00:53 -------
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2010-02/msg01088.html

Intel Core i7 result is OK:

http://gcc.gnu.org/ml/gcc-testresults/2010-02/msg02465.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2010-
                   |                            |02/msg01088.html


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (15 preceding siblings ...)
  2010-02-26  0:54 ` hjl dot tools at gmail dot com
@ 2010-02-26 13:19 ` hjl at gcc dot gnu dot org
  2010-03-02 13:31 ` hjl dot tools at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: hjl at gcc dot gnu dot org @ 2010-02-26 13:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from hjl at gcc dot gnu dot org  2010-02-26 13:18 -------
Subject: Bug 43175

Author: hjl
Date: Fri Feb 26 13:18:17 2010
New Revision: 157087

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157087
Log:
Correct expand_vec_perm_blend in i386.c for V8HImode merge.

gcc/

2010-02-26  Uros Bizjak  <ubizjak@gmail.com>

        PR target/43175
        * config/i386/i386.c (expand_vec_perm_blend): Use correct
        operands in V8HImode subregs.  Fix operand order in VEC_MERGE
        rtx.

gcc/testsuite/

2010-02-26  H.J. Lu  <hongjiu.lu@intel.com>

        PR target/43175
        * gcc.target/i386/vperm-v4si-2-sse4.c: New.

Added:
    trunk/gcc/testsuite/gcc.target/i386/vperm-v4si-2-sse4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1
  2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
                   ` (16 preceding siblings ...)
  2010-02-26 13:19 ` hjl at gcc dot gnu dot org
@ 2010-03-02 13:31 ` hjl dot tools at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-03-02 13:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from hjl dot tools at gmail dot com  2010-03-02 13:31 -------
Fixed.


-- 

hjl dot tools at gmail dot com changed:

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


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


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

end of thread, other threads:[~2010-03-02 13:31 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
2010-02-25 14:53 ` [Bug target/43175] " hjl dot tools at gmail dot com
2010-02-25 14:55 ` hjl dot tools at gmail dot com
2010-02-25 15:07 ` hjl dot tools at gmail dot com
2010-02-25 15:10 ` ubizjak at gmail dot com
2010-02-25 15:30 ` hjl dot tools at gmail dot com
2010-02-25 19:01 ` ubizjak at gmail dot com
2010-02-25 19:03 ` ubizjak at gmail dot com
2010-02-25 19:25 ` hjl dot tools at gmail dot com
2010-02-25 19:34 ` [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1 hjl dot tools at gmail dot com
2010-02-25 19:44 ` ubizjak at gmail dot com
2010-02-25 19:55 ` hjl dot tools at gmail dot com
2010-02-25 20:12 ` ubizjak at gmail dot com
2010-02-25 20:33 ` hjl dot tools at gmail dot com
2010-02-25 20:36 ` hjl dot tools at gmail dot com
2010-02-25 20:49 ` ubizjak at gmail dot com
2010-02-26  0:54 ` hjl dot tools at gmail dot com
2010-02-26 13:19 ` hjl at gcc dot gnu dot org
2010-03-02 13:31 ` hjl dot tools 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).