public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/50813] New: gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target
@ 2011-10-20 19:43 ubizjak at gmail dot com
  2011-10-20 19:46 ` [Bug target/50813] " ubizjak at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2011-10-20 19:43 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50813
           Summary: gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ubizjak@gmail.com
                CC: jakub@gcc.gnu.org, rth@gcc.gnu.org
            Target: x86-avx


Recent failure on AVX targets [1].

These two testcases try to generate avx2_permv2ti insn, which is disabled on
non-AVX2 targets:

(define_insn "avx2_permv2ti"
  [(set (match_operand:V4DI 0 "register_operand" "=x")
    (unspec:V4DI
      [(match_operand:V4DI 1 "register_operand" "x")
       (match_operand:V4DI 2 "nonimmediate_operand" "xm")
       (match_operand:SI 3 "const_0_to_255_operand" "n")]
      UNSPEC_VPERMTI))]
  "TARGET_AVX2"
  "vperm2i128\t{%3, %2, %1, %0|%0, %1, %2, %3}"
  [(set_attr "type" "sselog")
   (set_attr "prefix" "vex")
   (set_attr "mode" "OI")])

The pattern is generated through ix86_vectorize_builtin_vec_perm_ok via:

Breakpoint 1, gen_avx2_permv2ti (operand0=0x7ffff15862e0, 
    operand1=0x7ffff15862a0, operand2=0x7ffff15862c0, operand3=0x7ffff1997670)
    at insn-emit.c:14480
14480    {
(gdb) bt
#0  gen_avx2_permv2ti (operand0=0x7ffff15862e0, operand1=0x7ffff15862a0, 
    operand2=0x7ffff15862c0, operand3=0x7ffff1997670) at insn-emit.c:14480
#1  0x0000000000adca70 in expand_vec_perm_even_odd_1 (d=0x7fffffffdda0, odd=0)
    at /home/uros/gcc-svn/trunk/gcc/config/i386/i386.c:36132
#2  0x0000000000adcdda in expand_vec_perm_even_odd (d=0x7fffffffdda0)
    at /home/uros/gcc-svn/trunk/gcc/config/i386/i386.c:36201
#3  0x0000000000add743 in ix86_expand_vec_perm_builtin_1 (d=0x7fffffffdda0)
    at /home/uros/gcc-svn/trunk/gcc/config/i386/i386.c:36456
#4  0x0000000000adecdc in ix86_vectorize_builtin_vec_perm_ok (
    vec_type=0x7ffff1ac65e8, mask=0x7ffff1b132a0)
    at /home/uros/gcc-svn/trunk/gcc/config/i386/i386.c:36776
#5  0x00000000007c89a3 in can_vec_perm_expr_p (type=0x7ffff1ac65e8, 
    sel=0x7ffff1b132a0) at /home/uros/gcc-svn/trunk/gcc/optabs.c:6717

[1] http://gcc.gnu.org/ml/gcc-testresults/2011-10/msg02319.html


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

* [Bug target/50813] gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target
  2011-10-20 19:43 [Bug target/50813] New: gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target ubizjak at gmail dot com
@ 2011-10-20 19:46 ` ubizjak at gmail dot com
  2011-10-20 19:53 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2011-10-20 19:46 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-20
     Ever Confirmed|0                           |1

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2011-10-20 19:45:44 UTC ---
The failure manifests as:

In file included from vshuf-v4di.c:14:0:
vshuf-main.inc: In function ‘test_16’:
vshuf-main.inc:28:1: error: unrecognizable insn:
(insn 36 39 37 3 (set (reg:V4DI 99)
        (unspec:V4DI [
                (reg:V4DI 66 [ a.8 ])
                (reg:V4DI 98)
                (const_int 32 [0x20])
            ] UNSPEC_VPERMTI)) vshuf-main.inc:28 -1
     (nil))
vshuf-main.inc:28:1: internal compiler error: in extract_insn, at recog.c:2137
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

-O2 -mavx


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

* [Bug target/50813] gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target
  2011-10-20 19:43 [Bug target/50813] New: gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target ubizjak at gmail dot com
  2011-10-20 19:46 ` [Bug target/50813] " ubizjak at gmail dot com
@ 2011-10-20 19:53 ` jakub at gcc dot gnu.org
  2011-10-21 19:33 ` jakub at gcc dot gnu.org
  2012-01-20 11:29 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-20 19:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-20 19:52:45 UTC ---
Strange, wonder how I've missed this.
I guess easiest would be probably just to
if (!TARGET_AVX2)
  {
    struct expand_vec_perm_d d_copy = *d;
    d_copy.target = gen_lowpart (V{4DF,8SF}mode, d->target);
    d_copy.op0 = gen_lowpart (V{4DF,8SF}mode, d->op0);
    d_copy.op1 = gen_lowpart (V{4DF,8SF}mode, d->op1);
    return expand_vec_perm_even_odd_1 (&d_copy);
  }
for V{4DI,8SI}mode.  Or if (!TARGET_AVX2) return false;.


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

* [Bug target/50813] gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target
  2011-10-20 19:43 [Bug target/50813] New: gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target ubizjak at gmail dot com
  2011-10-20 19:46 ` [Bug target/50813] " ubizjak at gmail dot com
  2011-10-20 19:53 ` jakub at gcc dot gnu.org
@ 2011-10-21 19:33 ` jakub at gcc dot gnu.org
  2012-01-20 11:29 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-21 19:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-21 19:32:23 UTC ---
Author: jakub
Date: Fri Oct 21 19:32:20 2011
New Revision: 180311

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180311
Log:
    PR target/50813
    * config/i386/i386.c (expand_vec_perm_even_odd_1): Handle
    V4DImode and V8SImode for !TARGET_AVX2.

    * gcc.dg/torture/vshuf-32.inc: Add broadcast permutation
    from element other than first and reverse permutation.
    * gcc.dg/torture/vshuf-16.inc: Likewise.
    * gcc.dg/torture/vshuf-8.inc: Likewise.
    * gcc.dg/torture/vshuf-4.inc: Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/torture/vshuf-16.inc
    trunk/gcc/testsuite/gcc.dg/torture/vshuf-32.inc
    trunk/gcc/testsuite/gcc.dg/torture/vshuf-4.inc
    trunk/gcc/testsuite/gcc.dg/torture/vshuf-8.inc


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

* [Bug target/50813] gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target
  2011-10-20 19:43 [Bug target/50813] New: gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target ubizjak at gmail dot com
                   ` (2 preceding siblings ...)
  2011-10-21 19:33 ` jakub at gcc dot gnu.org
@ 2012-01-20 11:29 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-20 11:29 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-20 10:41:52 UTC ---
Fixed.


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

end of thread, other threads:[~2012-01-20 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-20 19:43 [Bug target/50813] New: gcc.dg/torture/vshuf-{v4di,v8si}.c fail on AVX target ubizjak at gmail dot com
2011-10-20 19:46 ` [Bug target/50813] " ubizjak at gmail dot com
2011-10-20 19:53 ` jakub at gcc dot gnu.org
2011-10-21 19:33 ` jakub at gcc dot gnu.org
2012-01-20 11:29 ` 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).