public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
@ 2015-07-03 11:45 evstupac at gmail dot com
  2015-07-03 12:01 ` [Bug lto/66752] " rguenth at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: evstupac at gmail dot com @ 2015-07-03 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66752
           Summary: spec2000 255.vortex performance compiled with GCC is
                    ~20% lower than with CLANG
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: evstupac at gmail dot com
  Target Milestone: ---

Should be reproduced with:
"-Ofast -flto -m32" on latest GCC and CLANG.

Mostly GCC looses performance in Part_Delete function.

I'm working on a small test reproducer.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
@ 2015-07-03 12:01 ` rguenth at gcc dot gnu.org
  2015-07-03 13:12 ` evstupac at gmail dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-03 12:01 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i?86-*-*
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
For me LTO helps quite a bit here.  What kind of machine was this tested on?


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
  2015-07-03 12:01 ` [Bug lto/66752] " rguenth at gcc dot gnu.org
@ 2015-07-03 13:12 ` evstupac at gmail dot com
  2015-07-10 16:21 ` ysrumyan at gmail dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: evstupac at gmail dot com @ 2015-07-03 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

Stupachenko Evgeny <evstupac at gmail dot com> changed:

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

--- Comment #2 from Stupachenko Evgeny <evstupac at gmail dot com> ---
20% I've got on Silvermont. But some gap should be on all x86 machines.
Not sure about other archs, but it looks like the issue is not target specific.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
  2015-07-03 12:01 ` [Bug lto/66752] " rguenth at gcc dot gnu.org
  2015-07-03 13:12 ` evstupac at gmail dot com
@ 2015-07-10 16:21 ` ysrumyan at gmail dot com
  2015-07-10 16:27 ` ysrumyan at gmail dot com
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ysrumyan at gmail dot com @ 2015-07-10 16:21 UTC (permalink / raw)
  To: gcc-bugs

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

Yuri Rumyantsev <ysrumyan at gmail dot com> changed:

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

--- Comment #3 from Yuri Rumyantsev <ysrumyan at gmail dot com> ---
We found out simple reproducer for this issue which is attached.
The problem is redundant test in loop:

  for (i = -1, flag = 1; ++i < N && flag;)
        if (a[i] == b) < set 'flag' to 0 & do something>

It is clear that test 'flag==1' can be deleted since there is the only place
where it is set up to zero (then-part).
Note that clang deletes it.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (2 preceding siblings ...)
  2015-07-10 16:21 ` ysrumyan at gmail dot com
@ 2015-07-10 16:27 ` ysrumyan at gmail dot com
  2015-07-10 16:35 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ysrumyan at gmail dot com @ 2015-07-10 16:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Yuri Rumyantsev <ysrumyan at gmail dot com> ---
Created attachment 35947
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35947&action=edit
test-case to reproduce

compile with -Ofast -m32 -march=slm and notice redundant test
.L30:
        testl   %edx, %edx
        je      .L1


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (3 preceding siblings ...)
  2015-07-10 16:27 ` ysrumyan at gmail dot com
@ 2015-07-10 16:35 ` pinskia at gcc dot gnu.org
  2015-07-14  6:28 ` law at redhat dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-07-10 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like bug 13876.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (4 preceding siblings ...)
  2015-07-10 16:35 ` pinskia at gcc dot gnu.org
@ 2015-07-14  6:28 ` law at redhat dot com
  2015-07-23 19:40 ` law at redhat dot com
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2015-07-14  6:28 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

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

--- Comment #7 from Jeffrey A. Law <law at redhat dot com> ---
This is something I'd be expecting the FSM code to detect for us -- but that
code isn't firing at all due to what appears to be a relatively simple logic
error.   Hacking it up under GDB's control results in the FSM code discovering
3 threadable paths within the loop.  The net result is all the
manipulation/testing of FLAG is eliminated.

I'll be taking a deeper look over the next few days.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (5 preceding siblings ...)
  2015-07-14  6:28 ` law at redhat dot com
@ 2015-07-23 19:40 ` law at redhat dot com
  2015-07-23 20:42 ` law at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2015-07-23 19:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jeffrey A. Law <law at redhat dot com> ---
After tracking down a couple bugs in the FSM support, I'm about ready to check
in a patch that should address the missed jump threads.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (6 preceding siblings ...)
  2015-07-23 19:40 ` law at redhat dot com
@ 2015-07-23 20:42 ` law at gcc dot gnu.org
  2015-07-23 20:49 ` law at redhat dot com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: law at gcc dot gnu.org @ 2015-07-23 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Thu Jul 23 20:42:15 2015
New Revision: 226125

URL: https://gcc.gnu.org/viewcvs?rev=226125&root=gcc&view=rev
Log:
        PR lto/66752
        * tree-ssa-threadedge.c (simplify_conrol_stmt_condition): If we are
        unable to find X NE 0 in the tables, return X as the simplified
        condition.
        (fsm_find_control_statement_thread_paths): If nodes in NEXT_PATH are
        in VISISTED_BBS, then return failure.  Else add nodes from NEXT_PATH
        to VISISTED_BBS.  */
        * tree-ssa-threadupdate.c (duplicate_thread_path): Fix up edge flags
        after removing the control flow statement and unnecessary edges.

testsuite/
        PR lto/66752
        * gcc.dg/tree-ssa/pr66752-2.c: New test.
        * gcc.dg/torture/pr66752-1.c: New test
        * g++.dg/torture/pr66752-2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr66752-2.C
    trunk/gcc/testsuite/gcc.dg/torture/pr66752-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-threadedge.c
    trunk/gcc/tree-ssa-threadupdate.c


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (7 preceding siblings ...)
  2015-07-23 20:42 ` law at gcc dot gnu.org
@ 2015-07-23 20:49 ` law at redhat dot com
  2015-07-24  8:23 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2015-07-23 20:49 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

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

--- Comment #10 from Jeffrey A. Law <law at redhat dot com> ---
Should be fixed on the trunk.  If you could verify that 255.vortex's
performance has improved, it'd be appreciated.

Thanks.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (8 preceding siblings ...)
  2015-07-23 20:49 ` law at redhat dot com
@ 2015-07-24  8:23 ` rguenth at gcc dot gnu.org
  2015-07-25  5:46 ` law at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-24  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed by our testers.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (9 preceding siblings ...)
  2015-07-24  8:23 ` rguenth at gcc dot gnu.org
@ 2015-07-25  5:46 ` law at gcc dot gnu.org
  2015-07-29 14:52 ` law at redhat dot com
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: law at gcc dot gnu.org @ 2015-07-25  5:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Sat Jul 25 05:45:42 2015
New Revision: 226206

URL: https://gcc.gnu.org/viewcvs?rev=226206&root=gcc&view=rev
Log:
Revert:
        PR lto/66752
        * tree-ssa-threadedge.c (simplify_conrol_stmt_condition): If we are
        unable to find X NE 0 in the tables, return X as the simplified
        condition.
        (fsm_find_control_statement_thread_paths): If nodes in NEXT_PATH are
        in VISISTED_BBS, then return failure.  Else add nodes from NEXT_PATH
        to VISISTED_BBS.  */
        * tree-ssa-threadupdate.c (duplicate_thread_path): Fix up edge flags
        after removing the control flow statement and unnecessary edges.

    testsuite/
        PR lto/66752
        * gcc.dg/tree-ssa/pr66752-2.c: New test.
        * gcc.dg/torture/pr66752-1.c: New test
        * g++.dg/torture/pr66752-2.C: New test.

Removed:
    trunk/gcc/testsuite/g++.dg/torture/pr66752-2.C
    trunk/gcc/testsuite/gcc.dg/torture/pr66752-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-threadedge.c
    trunk/gcc/tree-ssa-threadupdate.c


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (10 preceding siblings ...)
  2015-07-25  5:46 ` law at gcc dot gnu.org
@ 2015-07-29 14:52 ` law at redhat dot com
  2015-07-31 21:05 ` law at redhat dot com
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2015-07-29 14:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Jeffrey A. Law <law at redhat dot com> ---
Causes bootstrap failure on ppc64 that I haven't had time to dig into.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (11 preceding siblings ...)
  2015-07-29 14:52 ` law at redhat dot com
@ 2015-07-31 21:05 ` law at redhat dot com
  2015-08-27 16:05 ` law at redhat dot com
  2015-08-28 16:25 ` law at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2015-07-31 21:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Jeffrey A. Law <law at redhat dot com> ---
Just a status update.  This patch causes the stage1 compiler to mis-compile
tree-ssa-live, which in turn causes the stage2 compiler to incorrectly issue an
error when building the stage3 compiler on ppc64.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (12 preceding siblings ...)
  2015-07-31 21:05 ` law at redhat dot com
@ 2015-08-27 16:05 ` law at redhat dot com
  2015-08-28 16:25 ` law at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2015-08-27 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Jeffrey A. Law <law at redhat dot com> ---
The fix for the ppc64 bootstrap regression looks good.  I'm just having a bear
of a time producing a reasonable test for the regression suite.


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

* [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
  2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
                   ` (13 preceding siblings ...)
  2015-08-27 16:05 ` law at redhat dot com
@ 2015-08-28 16:25 ` law at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2015-08-28 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

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

--- Comment #19 from Jeffrey A. Law <law at redhat dot com> ---
Patch reinstalled on the trunk with a fix for the bootstrapping issue exposed
by ppc64.


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

end of thread, other threads:[~2015-08-28 16:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-03 11:45 [Bug lto/66752] New: spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG evstupac at gmail dot com
2015-07-03 12:01 ` [Bug lto/66752] " rguenth at gcc dot gnu.org
2015-07-03 13:12 ` evstupac at gmail dot com
2015-07-10 16:21 ` ysrumyan at gmail dot com
2015-07-10 16:27 ` ysrumyan at gmail dot com
2015-07-10 16:35 ` pinskia at gcc dot gnu.org
2015-07-14  6:28 ` law at redhat dot com
2015-07-23 19:40 ` law at redhat dot com
2015-07-23 20:42 ` law at gcc dot gnu.org
2015-07-23 20:49 ` law at redhat dot com
2015-07-24  8:23 ` rguenth at gcc dot gnu.org
2015-07-25  5:46 ` law at gcc dot gnu.org
2015-07-29 14:52 ` law at redhat dot com
2015-07-31 21:05 ` law at redhat dot com
2015-08-27 16:05 ` law at redhat dot com
2015-08-28 16:25 ` law at redhat 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).