public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/54390] New: [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
@ 2012-08-28  8:23 izamyatin at gmail dot com
  2012-08-28 13:21 ` [Bug regression/54390] " hjl.tools at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: izamyatin at gmail dot com @ 2012-08-28  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54390
           Summary: [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: izamyatin@gmail.com


For avx target on x86_64 there is one fail introduced by r190492:

FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c scan-tree-dump-times slp "not
vectorized: more than one data ref in stmt" 0

r190492:

Author: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Aug 17 19:59:46 2012 +0000

    Define MAX_FIXED_MODE_SIZE/TARGET_MEMBER_TYPE_FORCES_BLK for i386


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

* [Bug regression/54390] [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
  2012-08-28  8:23 [Bug regression/54390] New: [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c izamyatin at gmail dot com
@ 2012-08-28 13:21 ` hjl.tools at gmail dot com
  2012-12-28 15:41 ` vbyakovl23 at gmail dot com
  2021-08-15  8:11 ` [Bug testsuite/54390] " pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-08-28 13:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-08-28 13:21:29 UTC ---
Without AVX, we got

    xorps    %xmm4, %xmm4
    shufps    $0xe4, %xmm4, %xmm0
    movlhps    %xmm1, %xmm0
    movaps    %xmm4, %xmm1
    movaps    %xmm2, %xmm4
    shufps    $0xe4, %xmm1, %xmm4
    movaps    %xmm4, %xmm1
    movlhps    %xmm3, %xmm1
    addps    %xmm1, %xmm0
    movhps    %xmm0, -16(%rsp)
    movq    -16(%rsp), %rax
    movlps    %xmm0, -24(%rsp)
    movq    %rax, -48(%rsp)
    movq    -48(%rsp), %xmm1
    movq    -24(%rsp), %xmm0
    ret

Adding -mtune=corei7, we got

    movq    %xmm1, -16(%rsp)
    movq    %xmm0, -24(%rsp)
    movq    %xmm2, -40(%rsp)
    movups    -24(%rsp), %xmm0
    movq    %xmm3, -32(%rsp)
    movups    -40(%rsp), %xmm1
    addps    %xmm1, %xmm0
    movups    %xmm0, -24(%rsp)
    movq    -16(%rsp), %rax
    movq    -24(%rsp), %xmm0
    movd    %rax, %xmm1
    ret

With AVX, we got

    vmovq    %xmm0, -24(%rsp)
    vmovq    %xmm1, -16(%rsp)
    vmovq    %xmm2, -40(%rsp)
    vmovq    %xmm3, -32(%rsp)
    vmovups    -24(%rsp), %xmm1
    vmovups    -40(%rsp), %xmm0
    vaddps    %xmm0, %xmm1, %xmm0
    vmovups    %xmm0, -24(%rsp)
    movq    -16(%rsp), %rax
    movq    %rax, -48(%rsp)
    vmovq    -24(%rsp), %xmm0
    vmovq    -48(%rsp), %xmm1
    ret

I think -mavx/-mtune=corei7 enables unaligned load/store which
improves vectorizer.


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

* [Bug regression/54390] [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
  2012-08-28  8:23 [Bug regression/54390] New: [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c izamyatin at gmail dot com
  2012-08-28 13:21 ` [Bug regression/54390] " hjl.tools at gmail dot com
@ 2012-12-28 15:41 ` vbyakovl23 at gmail dot com
  2021-08-15  8:11 ` [Bug testsuite/54390] " pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: vbyakovl23 at gmail dot com @ 2012-12-28 15:41 UTC (permalink / raw)
  To: gcc-bugs


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

Vladimir Yakovlev <vbyakovl23 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vbyakovl23 at gmail dot com

--- Comment #2 from Vladimir Yakovlev <vbyakovl23 at gmail dot com> 2012-12-28 15:40:53 UTC ---
Compiler has different behavior on the test
gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c with –mavx and –mno-avx. With –mno-avx
routine get_vectype_for_scalar_type (scalar_type) at tree-vect-data-refs.c:3265
returns NULL for scalar_type “struct A” whereas with –mavx returns “vector(2)
__int128 unsigned”. 
The test is passed if constant 16 at line 6 of the test is replaced by 32 or 64
(better 64 otherwise we will have the problem with avx2 in future).

diff --git a/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
b/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
index 90dcd84..68e0bf1 100644
--- a/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
+++ b/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
@@ -3,7 +3,7 @@

 typedef __complex__ float Value;
 typedef struct {
-  Value a[16 / sizeof (Value)];
+  Value a[64 / sizeof (Value)];
 } A;

 A sum(A a,A b)


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

* [Bug testsuite/54390] [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
  2012-08-28  8:23 [Bug regression/54390] New: [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c izamyatin at gmail dot com
  2012-08-28 13:21 ` [Bug regression/54390] " hjl.tools at gmail dot com
  2012-12-28 15:41 ` vbyakovl23 at gmail dot com
@ 2021-08-15  8:11 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-15  8:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54390

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
          Component|target                      |testsuite
   Target Milestone|---                         |6.0

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The testcase was fixed in r6-4653 to match based on the basic block and then
changed again in r11-3723 to be really fixed.

Anyways fixed. It was just a testcase failure rather than a missed
optimization.

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

end of thread, other threads:[~2021-08-15  8:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-28  8:23 [Bug regression/54390] New: [AVX] FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c izamyatin at gmail dot com
2012-08-28 13:21 ` [Bug regression/54390] " hjl.tools at gmail dot com
2012-12-28 15:41 ` vbyakovl23 at gmail dot com
2021-08-15  8:11 ` [Bug testsuite/54390] " pinskia at gcc dot gnu.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).