public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/57927] New: -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
@ 2013-07-18 17:25 vincenzo.innocente at cern dot ch
  2013-07-18 17:51 ` [Bug target/57927] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2013-07-18 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57927
           Summary: -march=core-avx2  different than -march=native on
                    INTEL Haswell (i7-4700K)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincenzo.innocente at cern dot ch

for instance

mkdir scimark2TMP
cd scimark2TMP
wget http://math.nist.gov/scimark2/scimark2_1c.zip .
unzip scimark2_1c.zip
c++ -S LU.c -O3 -march=native -o LU.native -v
c++ -S LU.c -O3 -march=core-avx2 -o LU.avx2 -v
diff LU.native LU.avx2

if you run the benchmark
gcc -O3 -march=core-avx2 *.c -lm; ./a.out 5 
gcc -O3 -march=native *.c -lm; ./a.out 5 
"core-avx2" is better than "native"


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

* [Bug target/57927] -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
  2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
@ 2013-07-18 17:51 ` jakub at gcc dot gnu.org
  2013-07-18 19:53 ` glisse at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-07-18 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So what exactly does the -v print?


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

* [Bug target/57927] -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
  2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
  2013-07-18 17:51 ` [Bug target/57927] " jakub at gcc dot gnu.org
@ 2013-07-18 19:53 ` glisse at gcc dot gnu.org
  2013-08-27  3:43 ` shadow at umbrox dot de
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-07-18 19:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
gcc/config/i386/driver-i386.c host processor detection apparently hasn't been
updated for those recent processors yet. You could look for this code:

        case 0x2d:
          /* Sandy Bridge.  */
          cpu = "corei7-avx";
          break;

and add nearby:

        case 0x3a:
          /* Ivy Bridge.  */
          cpu = "core-avx2";
          break;

Also, a few lines below, before "if (has_avx)", one could test has_avx2 and use
core-avx2 as a default in that case.


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

* [Bug target/57927] -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
  2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
  2013-07-18 17:51 ` [Bug target/57927] " jakub at gcc dot gnu.org
  2013-07-18 19:53 ` glisse at gcc dot gnu.org
@ 2013-08-27  3:43 ` shadow at umbrox dot de
  2013-08-27  6:45 ` ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: shadow at umbrox dot de @ 2013-08-27  3:43 UTC (permalink / raw)
  To: gcc-bugs

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

Christian Widmer <shadow at umbrox dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shadow at umbrox dot de

--- Comment #4 from Christian Widmer <shadow at umbrox dot de> ---
Created attachment 30703
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30703&action=edit
Patch to add Ivy Bridge/Haswell detection

Here is a short patch adding Ivy Bridge and Haswell detection. Because Ivy
Bridge does not support AVX2 it differs a bit from the suggestion above.


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

* [Bug target/57927] -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
  2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
                   ` (2 preceding siblings ...)
  2013-08-27  3:43 ` shadow at umbrox dot de
@ 2013-08-27  6:45 ` ubizjak at gmail dot com
  2013-08-27 16:20 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2013-08-27  6:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Christian Widmer from comment #4)

> Here is a short patch adding Ivy Bridge and Haswell detection. Because Ivy
> Bridge does not support AVX2 it differs a bit from the suggestion above.

Please post patches to gcc-patches@ mailing list, following the procedure
outlined in [1].

[1] http://gcc.gnu.org/contribute.html
>From gcc-bugs-return-428424-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Aug 27 07:12:21 2013
Return-Path: <gcc-bugs-return-428424-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28550 invoked by alias); 27 Aug 2013 07:12:20 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 28484 invoked by uid 48); 27 Aug 2013 07:12:17 -0000
From: "Joost.VandeVondele at mat dot ethz.ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/57393] [4.9 Regression] error: definition in block 4 follows the use / internal compiler error: verify_ssa failed
Date: Tue, 27 Aug 2013 07:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57393-4-hSBZgaa4Po@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57393-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57393-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg01348.txt.bz2
Content-length: 636

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW393

--- Comment #23 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
(In reply to Easwaran Raman from comment #21)
> Created attachment 30690 [details]
> Proposed patch

I tested this patch on top of the one posted to the mailing list (comment #18),
and this fixes the testcase in #6 and #7. However it does not fix the testcase
reported in PR57923 (marked as dup of this PR, and replicated now for
completeness):

gcc -O3 :

char a;

foo (int **p)
{
  int b;
  for (;;) {
    int c[1] = {};
    unsigned *d = &c[0];
    for (b=7; b; b--)
      **p &= --*d >= a;
  }
}


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

* [Bug target/57927] -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
  2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
                   ` (3 preceding siblings ...)
  2013-08-27  6:45 ` ubizjak at gmail dot com
@ 2013-08-27 16:20 ` hjl.tools at gmail dot com
  2013-08-27 20:20 ` shadow at umbrox dot de
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2013-08-27 16:20 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |areg.melikadamyan at gmail dot com

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Christian Widmer from comment #4)
> Created attachment 30703 [details]
> Patch to add Ivy Bridge/Haswell detection
> 
> Here is a short patch adding Ivy Bridge and Haswell detection. Because Ivy
> Bridge does not support AVX2 it differs a bit from the suggestion above.

Ivy Bridge is core-avx-i, not corei7-avx.


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

* [Bug target/57927] -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
  2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
                   ` (4 preceding siblings ...)
  2013-08-27 16:20 ` hjl.tools at gmail dot com
@ 2013-08-27 20:20 ` shadow at umbrox dot de
  2013-08-27 21:16 ` jakub at gcc dot gnu.org
  2013-08-28  8:42 ` ubizjak at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: shadow at umbrox dot de @ 2013-08-27 20:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Christian Widmer <shadow at umbrox dot de> ---
(In reply to H.J. Lu from comment #6)
> (In reply to Christian Widmer from comment #4)
> > Created attachment 30703 [details]
> > Patch to add Ivy Bridge/Haswell detection
> > 
> > Here is a short patch adding Ivy Bridge and Haswell detection. Because Ivy
> > Bridge does not support AVX2 it differs a bit from the suggestion above.
> 
> Ivy Bridge is core-avx-i, not corei7-avx.

Indeed it is. Although I have sent my wrong version to the mailing list a
corrected version has been committed to trunk in the meantime which has later
been amended by further model numbers. This bug can probably be closed now.


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

* [Bug target/57927] -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
  2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
                   ` (5 preceding siblings ...)
  2013-08-27 20:20 ` shadow at umbrox dot de
@ 2013-08-27 21:16 ` jakub at gcc dot gnu.org
  2013-08-28  8:42 ` ubizjak at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-27 21:16 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

* [Bug target/57927] -march=core-avx2  different than -march=native on INTEL Haswell (i7-4700K)
  2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
                   ` (6 preceding siblings ...)
  2013-08-27 21:16 ` jakub at gcc dot gnu.org
@ 2013-08-28  8:42 ` ubizjak at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2013-08-28  8:42 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3089 bytes --]

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2013-08/msg01602.htm
                   |                            |l
   Target Milestone|---                         |4.8.2

--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
Also backported to 4.8 (and in part to 4.7) branch.
>From gcc-bugs-return-428501-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 28 08:59:52 2013
Return-Path: <gcc-bugs-return-428501-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4874 invoked by alias); 28 Aug 2013 08:59:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 4823 invoked by uid 48); 28 Aug 2013 08:59:48 -0000
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/58106] ICE: in ipa_edge_duplication_hook, at ipa-prop.c:2839
Date: Wed, 28 Aug 2013 08:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jamborm at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-58106-4-tVPNrjs7zW@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58106-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58106-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg01425.txt.bz2
Content-length: 589

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX106

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Created attachment 30708
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id0708&actioníit
Patch

The problem is that the rdesc chain creation mechanism cannot handle
the case where indirect inlining creates its master_clone and we are
thus "normally" cloning an inline tree.  Fixed with this (fully
tested) patch.  I forgot to add the testcase, will do that before
submitting.  I would also like to measure the chain lengths on at
least a few benchmarks first too.


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

end of thread, other threads:[~2013-08-28  8:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-18 17:25 [Bug target/57927] New: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) vincenzo.innocente at cern dot ch
2013-07-18 17:51 ` [Bug target/57927] " jakub at gcc dot gnu.org
2013-07-18 19:53 ` glisse at gcc dot gnu.org
2013-08-27  3:43 ` shadow at umbrox dot de
2013-08-27  6:45 ` ubizjak at gmail dot com
2013-08-27 16:20 ` hjl.tools at gmail dot com
2013-08-27 20:20 ` shadow at umbrox dot de
2013-08-27 21:16 ` jakub at gcc dot gnu.org
2013-08-28  8:42 ` 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).