public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
@ 2013-04-19  0:46 triplesquarednine at gmail dot com
  2013-04-19  0:55 ` [Bug middle-end/57003] " pinskia at gcc dot gnu.org
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: triplesquarednine at gmail dot com @ 2013-04-19  0:46 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 57003
           Summary: gcc-4.8.0 breaks -O2 optimization with Wine(64) -
                    links/info/bisect of commits included
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: triplesquarednine@gmail.com


Hi,

myself and others have been trying to track down problems with compiling (and
using) wine64 with GCC-4.8.0. ~ Optimization level -O2 - which is usually the
default optimization level for building wine, breaks wine64. Obviously, with
gcc-4.7.2/3 -O2 works just fine. 

Here is the Wine bug report; http://bugs.winehq.org/show_bug.cgi?id=33307

Austin English (Wine-dev) ran a bisect on GCC to try to narrow down the
problems. here is his relevant post on that, regarding this bug report;

So the bad commit is:
commit c8010b803d34fa7e096747067e33c650b36ecc06
Author: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon May 14 12:08:31 2012 +0000

        * attribs.c (decl_attributes): Avoid emitting a warning if
        ATTR_FLAG_BUILT_IN.
        * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Use lowercase for rtx
        codes.  Document meaning of sets inside CALL_INSN_FUNCTION_USAGE.
        * c-family/c-common.c (DEF_ATTR_STRING): Define and undefine as
        necessary.
        * builtin-attrs.def (DEF_ATTR_FOR_STRING): Define.  Use it to
        define a string "1".
        (ATTR_RET1_NOTHROW_NONNULL_LEAF): New attr definition.
        * builtins.def (BUILT_IN_MEMCPY, BUILT_IN_MEMMOVE, BUILT_IN_MEMSET,
        BUILT_IN_STRCPY): Use it for these functions.
        * postreload.c (reload_combine): Deal with SETs inside
        CALL_INSN_FUNCTION_USAGE.
        * caller-save.c (setup_save_areas, save_call_clobbered_regs):
        Look for REG_RETURNED notes and use a cheap restore if possible.
        * ira-int.h (struct ira_allocno): New member cheap_calls_crossed_num.
        (ALLOCNO_CHEAP_CALLS_CROSSED_NUM): New macro.
        * ira-build.c (ira_create_allocno, create_cap_allocno,
        propagate_allocno_info, propagate_some_info_from_allocno,
        copy_info_to_removed_store_destination, ira_flattening): Handle it.
        * ira-lives.c (pseudo_regno_single_word_and_live_p,
        find_call_crossed_cheap_reg): New static functions.
        (process_bb_node_lives): Look for SETs in CALL_INSN_FUNCTION_USAGE,
        and set ALLOCNO_CHEAP_CALLS_CROSSED_NUM if possible.  Also make
        a REG_RETURNED note in that case.
        * ira.c (setup_reg_renumber): Change assert to allow cases where
        allocnos only cross calls for which they are cheap to restore.
        * ira-costs.c (ira_tune_allocno_costs): Compare
        ALLOCNO_CALLS_CROSSED_NUM to ALLOCNO_CHEAP_CALLS_CROSSED_NUM rather
        than 0.
        * reg-notes.def (REG_RETURNED): New note.
        * cse.c (cse_insn): Likewise.
        * sched-deps.c (sched_analyze_insn): Likewise.
        * expr.c (init_block_move_fn): Set a "fn spec" attribute.
        * calls.c (decl_return_flags): New static function.
        (expand_call): Generate a SET in CALL_INSN_FUNCTION_USAGE for
        functions that return one of their arguments.
        * lto/lto-lang.c (handle_fnspec_attribute): New static function.
        (lto_attribute_table): Add "fn spec".
        (DEF_ATTR_STRING): Define and undefine along with the other macros.
        * regcprop.c (struct kill_set_value_data): New.
        (kill_set_value): Interpret data as a pointer to such a struct.
        Do nothing if the caller wants the register to be ignored.
        (copyprop_hardreg_forward_1): Handle SETs in CALL_INSN_FUNCTION_USAGE.

    testsuite/
        * gcc.target/i386/retarg.c: New test.

    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187459
138bc75d-0d04-0410-961f-82ee72b054a4

after this commit, wine will fail to build (with default -O2 settings, gcc will
crash with an internal error). The compile itself is fixed by a later commit:
commit d73df2920c77116fd88e03cd95dd352f16511a3f
Author: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon May 21 21:37:01 2012 +0000

        PR rtl-optimization/53373
        * caller-save.c (save_call_clobbered_regs): Look into a possible
        PARALLEL manually rather than using single_set on a call insn.
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187745
138bc75d-0d04-0410-96

after this, wine will compile fine, but segfaults on launch.

A quick search on http://gcc.gnu.org/bugzilla/ doesn't show anything for that
commit. If someone else would file a bug upstream with this info, it would be
appreciated.
______

If i can provide any more info - please let me know, or even better ~ post the
the WineHQ bug report that i have linked to above ~ as Austin or possibly
another Wine-Developer may be able to help further.

thanks.

Jordan


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
@ 2013-04-19  0:55 ` pinskia at gcc dot gnu.org
  2013-04-19  1:00 ` pinskia at gcc dot gnu.org
                   ` (26 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-04-19  0:55 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-19 00:55:11 UTC ---
IIRC this is usually due to mis writing of memcpy/memset where you return null
rather than the dest (first argument).


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
  2013-04-19  0:55 ` [Bug middle-end/57003] " pinskia at gcc dot gnu.org
@ 2013-04-19  1:00 ` pinskia at gcc dot gnu.org
  2013-04-19  8:26 ` rguenth at gcc dot gnu.org
                   ` (25 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-04-19  1:00 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-19 01:00:03 UTC ---
(In reply to comment #1)
> IIRC this is usually due to mis writing of memcpy/memset where you return null
> rather than the dest (first argument).

See PR56881.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
  2013-04-19  0:55 ` [Bug middle-end/57003] " pinskia at gcc dot gnu.org
  2013-04-19  1:00 ` pinskia at gcc dot gnu.org
@ 2013-04-19  8:26 ` rguenth at gcc dot gnu.org
  2013-04-21 14:22 ` dank at kegel dot com
                   ` (24 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-19  8:26 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-04-19
     Ever Confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-19 08:26:30 UTC ---
To narrow down the problem more you can cherry-pick
d73df2920c77116fd88e03cd95dd352f16511a3f to after the commit that broke build
and continue bi-secting?


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (2 preceding siblings ...)
  2013-04-19  8:26 ` rguenth at gcc dot gnu.org
@ 2013-04-21 14:22 ` dank at kegel dot com
  2013-04-21 18:06 ` pinskia at gcc dot gnu.org
                   ` (23 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: dank at kegel dot com @ 2013-04-21 14:22 UTC (permalink / raw)
  To: gcc-bugs


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

dank at kegel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dank at kegel dot com

--- Comment #4 from dank at kegel dot com 2013-04-21 14:22:41 UTC ---
Austin English said

"I did...that's what led to the original commit showing the segfault.
IOW:
$ git reset --hard c8010b803d34fa7e096747067e33c650b36ecc06
# build gcc/wine - gcc fails to build wine, internal compiler error
$ git show d73df2920c77116fd88e03cd95dd352f16511a3f | patch -p1
# build gcc/wine - wine segfaults on launch"

So bisecting seems complete.

Also, Kirill Smirnov reports that building wine using just -O2 runs into
this bug for him, but building wine with "-O2 -fno-builtin-memcpy" doesn't.

Next step may be to bisect wine's source code to see which file or files
misbehave when built with -O2 but without -fno-builtin-memcpy.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (3 preceding siblings ...)
  2013-04-21 14:22 ` dank at kegel dot com
@ 2013-04-21 18:06 ` pinskia at gcc dot gnu.org
  2013-04-22 16:39 ` dank at kegel dot com
                   ` (22 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-04-21 18:06 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-21 18:06:36 UTC ---
(In reply to comment #4)
> Next step may be to bisect wine's source code to see which file or files
> misbehave when built with -O2 but without -fno-builtin-memcpy.

Actually it should be easier than that.  Look at the implementation of memcpy
that wine has included in it and see if it returns the correct value.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (4 preceding siblings ...)
  2013-04-21 18:06 ` pinskia at gcc dot gnu.org
@ 2013-04-22 16:39 ` dank at kegel dot com
  2013-04-23  9:44 ` kirill.k.smirnov at math dot spbu.ru
                   ` (21 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: dank at kegel dot com @ 2013-04-22 16:39 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from dank at kegel dot com 2013-04-22 16:39:37 UTC ---
You'd think... but I didn't find any obvious memcpy replacement.

I spent some time bisecting the wine source yesterday.  There appear to be
at least three or four affected sites.  I bisected one of the affected files
with
#pragma GCC optimize("-O2")
...
#pragma GCC optimize("-O1")
and the offending memcpy() there seems to be
http://source.winehq.org/source/dlls/kernel32/process.c#L1316

There are plenty of clues to chase down, hope I have time to spend on it 
sometime soon.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (5 preceding siblings ...)
  2013-04-22 16:39 ` dank at kegel dot com
@ 2013-04-23  9:44 ` kirill.k.smirnov at math dot spbu.ru
  2013-04-23  9:51 ` jakub at gcc dot gnu.org
                   ` (20 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: kirill.k.smirnov at math dot spbu.ru @ 2013-04-23  9:44 UTC (permalink / raw)
  To: gcc-bugs


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

Kirill Smirnov <kirill.k.smirnov at math dot spbu.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kirill.k.smirnov at math
                   |                            |dot spbu.ru

--- Comment #7 from Kirill Smirnov <kirill.k.smirnov at math dot spbu.ru> 2013-04-23 09:44:03 UTC ---
It seems gcc over-optimizes series of memcpy() function calls one after
another. The piece of code does not work:

memcpy( buffer, DIR_Windows, len * sizeof(WCHAR) );
memcpy( buffer + len, default_syswow64W, sizeof(default_syswow64W)

There is a wrapper around memcpy() called memcpy_unaligned() to avoid
builtin/inlining.
And these pieces of code work:

memcpy( buffer, DIR_Windows, len * sizeof(WCHAR) );
memcpy_unaligned( buffer + len, default_syswow64W, sizeof(default_syswow64W) );

and

memcpy_unaligned( buffer, DIR_Windows, len * sizeof(WCHAR) );
memcpy( buffer + len, default_syswow64W, sizeof(default_syswow64W) );

I'm sorry for copy-and-pasting wine code as is, I tried but failed to create a
refined test case.


So this case is opposite as previously suggested: the memcpy_unaligned()
wrapper is OK, but native memcpy() is failing.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (6 preceding siblings ...)
  2013-04-23  9:44 ` kirill.k.smirnov at math dot spbu.ru
@ 2013-04-23  9:51 ` jakub at gcc dot gnu.org
  2013-04-23 15:57 ` kirill.k.smirnov at math dot spbu.ru
                   ` (19 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-23  9:51 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-23 09:51:23 UTC ---
The important question is what that
   memcpy( buffer, DIR_Windows, len * sizeof(WCHAR) );
   memcpy( buffer + len, default_syswow64W, sizeof(default_syswow64W) );
compiles to.  If it is
...
call memcpy
leal (%rax, ...), %rdi ! or similar, the important is that buffer is preserved
in return value of the previous memcpy call
...
call memcpy
Then if it doesn't work, you need to look at whatever memcpy implementation you
are calling and see whether it correctly returns the first argument it has been
passed to it in all cases.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (7 preceding siblings ...)
  2013-04-23  9:51 ` jakub at gcc dot gnu.org
@ 2013-04-23 15:57 ` kirill.k.smirnov at math dot spbu.ru
  2013-04-23 16:00 ` jakub at gcc dot gnu.org
                   ` (18 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: kirill.k.smirnov at math dot spbu.ru @ 2013-04-23 15:57 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Kirill Smirnov <kirill.k.smirnov at math dot spbu.ru> 2013-04-23 15:56:59 UTC ---

>... whatever memcpy implementation you are calling and see whether it correctly returns the first argument it has been passed to it in all cases.

Fails (gcc version of memcpy):
   __builtin_memcpy( buffer, DIR_Windows, len * sizeof(WCHAR) );
   __builtin_memcpy( buffer + len, default_syswow64W, sizeof(default_syswow64W)
);


Works (glibc version of memcpy):
   memcpy( buffer, DIR_Windows, len * sizeof(WCHAR) );
   memcpy( buffer + len, default_syswow64W, sizeof(default_syswow64W) );


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (8 preceding siblings ...)
  2013-04-23 15:57 ` kirill.k.smirnov at math dot spbu.ru
@ 2013-04-23 16:00 ` jakub at gcc dot gnu.org
  2013-04-23 21:33 ` kirill.k.smirnov at math dot spbu.ru
                   ` (17 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-23 16:00 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-23 16:00:52 UTC ---
But __builtin_memcpy isn't necessarily the inline memcpy code, it can very well
be a library call too.
Anyway, this bugreport doesn't have a preprocessed source attached to it, nor
list of all gcc options to compile it, so there is nothing to look at.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (9 preceding siblings ...)
  2013-04-23 16:00 ` jakub at gcc dot gnu.org
@ 2013-04-23 21:33 ` kirill.k.smirnov at math dot spbu.ru
  2013-04-23 22:01 ` kirill.k.smirnov at math dot spbu.ru
                   ` (16 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: kirill.k.smirnov at math dot spbu.ru @ 2013-04-23 21:33 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #11 from Kirill Smirnov <kirill.k.smirnov at math dot spbu.ru> 2013-04-23 21:33:10 UTC ---
I'm sorry I cannot reproduce invalid behaviour within a refined test case.

Instead I can provide commented asm dump from wine.

This block of code works: the returned value (rax register) is used as a
pointer to destination buffer.

// memcpy( buffer, DIR_Windows, len * sizeof(WCHAR) );
  mov    rsi,QWORD PTR [rip+0x3e80aa]      # 455c30 <DIR_Windows>
  mov    rdx,rbx
  mov    rdi,rax
  call   26000 <memcpy@plt>
// HERE rax points to destination buffer and rdi is corrupted by memcpy
  mov    rcx,rax
// memcpy( buffer + len, default_syswow64W, sizeof(default_syswow64W) );
  mov    rax,QWORD PTR [rip+0x33d95]       # a1930 <default_syswow64W.21831>
  xor    edx,edx
  mov    QWORD PTR [rcx+rbx*1],rax
  mov    rax,QWORD PTR [rip+0x33d90]       # a1938<default_syswow64W.21831+0x8>
  mov    QWORD PTR [rip+0x3e8071],rcx      # 455c20 <DIR_SysWow64>
  mov    QWORD PTR [rcx+rbx*1+0x8],rax



This block of code does not work: the returned value (rax) is immediately
overwritten and rdi (corrupted by memcpy()) is used as a destination buffer.

// memcpy( buffer, DIR_Windows, len * sizeof(WCHAR) );
  mov    rsi,QWORD PTR [rip+0x3e296a]        # 455d10 <DIR_Windows>
  mov    rdi,rax
  mov    rdx,rbx
  call   26060 <memcpy@plt>
// memcpy( buffer + len, default_syswow64W, sizeof(default_syswow64W) );
// HERE rdi is corrupted my GLIBC memcpy and rax is going to be overwritten
  mov    rax,QWORD PTR [rip+0x2e698]        # a1a50 <default_syswow64W.21831>
  xor    edx,edx
  mov    rcx,rdi
  mov    QWORD PTR [rdi+rbx*1],rax


I'm not sure whether registers with arguments must be kept intact after
function returns, but it seems the bug is found - in gcc or glibc.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (10 preceding siblings ...)
  2013-04-23 21:33 ` kirill.k.smirnov at math dot spbu.ru
@ 2013-04-23 22:01 ` kirill.k.smirnov at math dot spbu.ru
  2013-04-24  9:25 ` bernds at gcc dot gnu.org
                   ` (15 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: kirill.k.smirnov at math dot spbu.ru @ 2013-04-23 22:01 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #12 from Kirill Smirnov <kirill.k.smirnov at math dot spbu.ru> 2013-04-23 22:01:18 UTC ---
I' sorry, forgot to mention compiler flags: -O2 -g


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (11 preceding siblings ...)
  2013-04-23 22:01 ` kirill.k.smirnov at math dot spbu.ru
@ 2013-04-24  9:25 ` bernds at gcc dot gnu.org
  2013-04-24 16:06 ` kirill.k.smirnov at math dot spbu.ru
                   ` (14 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: bernds at gcc dot gnu.org @ 2013-04-24  9:25 UTC (permalink / raw)
  To: gcc-bugs


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

Bernd Schmidt <bernds at gcc dot gnu.org> changed:

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

--- Comment #13 from Bernd Schmidt <bernds at gcc dot gnu.org> 2013-04-24 09:25:47 UTC ---
We need at least preprocessed source of the failing code, produced with gcc -E.


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

* [Bug middle-end/57003] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (12 preceding siblings ...)
  2013-04-24  9:25 ` bernds at gcc dot gnu.org
@ 2013-04-24 16:06 ` kirill.k.smirnov at math dot spbu.ru
  2013-04-24 16:50 ` [Bug rtl-optimization/57003] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: kirill.k.smirnov at math dot spbu.ru @ 2013-04-24 16:06 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #14 from Kirill Smirnov <kirill.k.smirnov at math dot spbu.ru> 2013-04-24 16:06:41 UTC ---
Created attachment 29929
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29929
gcc -E output.

Attached gcc -E output. Lines around 22354 are being investigated.


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

* [Bug rtl-optimization/57003] [4.8/4.9 Regression] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (13 preceding siblings ...)
  2013-04-24 16:06 ` kirill.k.smirnov at math dot spbu.ru
@ 2013-04-24 16:50 ` jakub at gcc dot gnu.org
  2013-04-24 18:24 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-24 16:50 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
          Component|middle-end                  |rtl-optimization
   Target Milestone|---                         |4.8.1
            Summary|gcc-4.8.0 breaks -O2        |[4.8/4.9 Regression]
                   |optimization with Wine(64)  |gcc-4.8.0 breaks -O2
                   |- links/info/bisect of      |optimization with Wine(64)
                   |commits included            |- links/info/bisect of
                   |                            |commits included

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-24 16:50:21 UTC ---
Ah, ok, I can see it.  To look at 22354 it helps to sed -i 's/^# .*$//', then
look for 22354 in the dump.  Seems the code is still correct at *.ce3 pass,
Bernd's optimization kicks in during RA time before that and the pseudo holding
buffer is assigned to %rdi before the call memcpy and assumed to live in %rax
right after the call.  But cprop_hardreg breaks this, changes the %rax after
the memcpy call into %rdi, even when %rdi is call clobbered register, and even
the call pattern contains (clobber (reg:DI 5 di)) and REG_DEAD note for the
same register.


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

* [Bug rtl-optimization/57003] [4.8/4.9 Regression] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (14 preceding siblings ...)
  2013-04-24 16:50 ` [Bug rtl-optimization/57003] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
@ 2013-04-24 18:24 ` jakub at gcc dot gnu.org
  2013-04-24 18:45 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-24 18:24 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-24 18:24:23 UTC ---
Reduced testcase (non-runtime, but one can see that %rdi which should be
clobbered by the memcpy call is used immediately after the memcpy call).
Probably wouldn't be too hard to turn this into an executable testcase, by
adding some noinline/noclone attributes, define bar, baz functions, and in main
initialize b.

const unsigned short *b, *c;
unsigned bar (void);
unsigned short *baz (unsigned long);

void __attribute__ ((ms_abi))
test (void)
{
  unsigned d;
  unsigned short *e;
  if ((d = bar ()))
    {
      e = baz (d * sizeof (unsigned short) + 20);
      __builtin_memcpy (e, b, d * sizeof (unsigned short));
      c = e;
    }
}

The ms_abi attribute seems to be essential for this, so perhaps something is
broken in the ms ABI support or when mixing the two ABIs?


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

* [Bug rtl-optimization/57003] [4.8/4.9 Regression] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (15 preceding siblings ...)
  2013-04-24 18:24 ` jakub at gcc dot gnu.org
@ 2013-04-24 18:45 ` jakub at gcc dot gnu.org
  2013-04-25  7:51 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-24 18:45 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-24 18:45:28 UTC ---
Runtime testcase for -O2, works with -O2 -fno-cprop-registers.
It doesn't fail always, but around in 50% of cases, and heavily depends on what
glibc is in use and what CPU too (as contemporary glibc's have IFUNC memcpy and
select implementations based on cpuid).

#define N 2001
unsigned short *b, *c, *d;

__attribute__ ((noinline, noclone)) unsigned
bar (void)
{
  asm volatile ("" : : : "memory");
  return N;
}

__attribute__ ((noinline, noclone)) unsigned short *
baz (unsigned long x)
{
  if (x != N * sizeof (unsigned short) + 20)
    __builtin_abort ();
  asm volatile ("" : : : "memory");
  return d;
}

__attribute__ ((ms_abi, noinline, noclone))
foo (void)
{
  unsigned d;
  unsigned short *e;
  if ((d = bar ()))
    {
      e = baz (d * sizeof (unsigned short) + 20);
      __builtin_memcpy (e, b, d * sizeof (unsigned short));
      c = e;
    }
}

int
main ()
{
  unsigned short a[2 * N];
  int i;
  for (i = 0; i < 2 * N; i++)
    a[i] = i + 1;
  b = a;
  d = a + N;
  asm volatile ("" : : : "memory");
  foo ();
  for (i = 0; i < N; i++)
    if (a[i] != i + 1 || a[i + N] != i + 1)
      __builtin_abort ();
  if (c != a + N)
    __builtin_abort ();
  return 0;
}


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

* [Bug rtl-optimization/57003] [4.8/4.9 Regression] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (16 preceding siblings ...)
  2013-04-24 18:45 ` jakub at gcc dot gnu.org
@ 2013-04-25  7:51 ` jakub at gcc dot gnu.org
  2013-04-25  9:54 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-25  7:51 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-25 07:51:48 UTC ---
Ah, so the issue is related to the fact that %rdi/%rsi aren't call clobbered in
ms_abi, but are call clobbered in the sysv abi.  The CALL_INSN pattern has
clobbers for rsi/rdi, but copyprop_hardreg_forward_1 processes those early,
perhaps then the CALL_INSN_FUNCTION_USAGE changes something and relies on
regs_invalidated_by_call processing to invalidate whatever is necessary.


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

* [Bug rtl-optimization/57003] [4.8/4.9 Regression] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (17 preceding siblings ...)
  2013-04-25  7:51 ` jakub at gcc dot gnu.org
@ 2013-04-25  9:54 ` jakub at gcc dot gnu.org
  2013-04-25 10:12 ` bernds at gcc dot gnu.org
                   ` (8 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-25  9:54 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-25 09:54:20 UTC ---
Created attachment 29936
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29936
gcc49-pr57003.patch

Untested fix.  While we kill_clobbered_value early, for SET in
CALL_INSN_FUNCTION_USAGE we add a value equivalence.  In standard x86_64 ABI
%rdi is invalidated by the call and present in the hard reg set to invalidate,
so it is removed again, and perhaps if there is some target where the first
argument is passed in non-call-clobbered register, the equivalence is correct.

So, what the patch does is in this case apply the clobbers again.  Bernd, does
this look reasonable to you as the author of those changes?


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

* [Bug rtl-optimization/57003] [4.8/4.9 Regression] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (18 preceding siblings ...)
  2013-04-25  9:54 ` jakub at gcc dot gnu.org
@ 2013-04-25 10:12 ` bernds at gcc dot gnu.org
  2013-04-26 17:50 ` kirill.k.smirnov at math dot spbu.ru
                   ` (7 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: bernds at gcc dot gnu.org @ 2013-04-25 10:12 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #20 from Bernd Schmidt <bernds at gcc dot gnu.org> 2013-04-25 10:12:12 UTC ---
Patch is OK, thanks Jakub - you were too fast for me on this one.


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

* [Bug rtl-optimization/57003] [4.8/4.9 Regression] gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (19 preceding siblings ...)
  2013-04-25 10:12 ` bernds at gcc dot gnu.org
@ 2013-04-26 17:50 ` kirill.k.smirnov at math dot spbu.ru
  2014-10-03 14:24 ` [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc " ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: kirill.k.smirnov at math dot spbu.ru @ 2013-04-26 17:50 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #22 from Kirill Smirnov <kirill.k.smirnov at math dot spbu.ru> 2013-04-26 17:50:07 UTC ---
Confirming: the attached patch fixes the problem with wine.

Thank you!


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

* [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (20 preceding siblings ...)
  2013-04-26 17:50 ` kirill.k.smirnov at math dot spbu.ru
@ 2014-10-03 14:24 ` ubizjak at gmail dot com
  2014-10-03 17:55 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: ubizjak at gmail dot com @ 2014-10-03 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #23)

> The difference is, that previously we emit memcpy call as:

Slip of the tongue, this should read:

... that now we emit memcpy call as:
>From gcc-bugs-return-463194-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 03 14:25:43 2014
Return-Path: <gcc-bugs-return-463194-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18972 invoked by alias); 3 Oct 2014 14:25:43 -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 18926 invoked by uid 48); 3 Oct 2014 14:25:39 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/55217] False -Wstrict-overflow warning
Date: Fri, 03 Oct 2014 14:25: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.7.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-55217-4-Jr3Z6pFE9f@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-55217-4@http.gcc.gnu.org/bugzilla/>
References: <bug-55217-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg00215.txt.bz2
Content-length: 573

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

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

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Michael Veksler from comment #1)
> (Strange that this hasn't been confirmed for over a year!)

Too many bug reports and too few developers...
>From gcc-bugs-return-463195-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 03 14:27:36 2014
Return-Path: <gcc-bugs-return-463195-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24004 invoked by alias); 3 Oct 2014 14:27:36 -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 23973 invoked by uid 55); 3 Oct 2014 14:27:33 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/63449] documentation of vector space overhead management
Date: Fri, 03 Oct 2014 14:27:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords: documentation
X-Bugzilla-Severity: trivial
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: redi at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63449-4-FP6nwcCO02@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63449-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63449-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: 2014-10/txt/msg00216.txt.bz2
Content-length: 805

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc449

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Oct  3 14:27:01 2014
New Revision: 215852

URL: https://gcc.gnu.org/viewcvs?rev!5852&root=gcc&view=rev
Log:
    PR libstdc++/63449
    * doc/xml/manual/containers.xml: Remove outdated section. Update
    std::list notes.
    * doc/html/*: Regenerate.

Modified:
    branches/gcc-4_9-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_9-branch/libstdc++-v3/doc/html/index.html
    branches/gcc-4_9-branch/libstdc++-v3/doc/html/manual/containers.html
    branches/gcc-4_9-branch/libstdc++-v3/doc/html/manual/index.html
    branches/gcc-4_9-branch/libstdc++-v3/doc/html/manual/std_contents.html
    branches/gcc-4_9-branch/libstdc++-v3/doc/xml/manual/containers.xml


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

* [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (21 preceding siblings ...)
  2014-10-03 14:24 ` [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc " ubizjak at gmail dot com
@ 2014-10-03 17:55 ` ubizjak at gmail dot com
  2014-10-03 18:08 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: ubizjak at gmail dot com @ 2014-10-03 17:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #26 from Uroš Bizjak <ubizjak at gmail dot com> ---
Additional patch at [1]

[1] https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00332.html
>From gcc-bugs-return-463217-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 03 18:01:52 2014
Return-Path: <gcc-bugs-return-463217-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8686 invoked by alias); 3 Oct 2014 18:01: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 8268 invoked by uid 48); 3 Oct 2014 18:01:47 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55250] [C++0x] enum declarations within constexpr function are allowed, constexpr declarations are not
Date: Fri, 03 Oct 2014 18:01:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.7.1
X-Bugzilla-Keywords: accepts-invalid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status assigned_to
Message-ID: <bug-55250-4-Cl7bLQ6pdg@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-55250-4@http.gcc.gnu.org/bugzilla/>
References: <bug-55250-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: 2014-10/txt/msg00238.txt.bz2
Content-length: 468

https://gcc.gnu.org/bugzilla/show_bug.cgi?idU250

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


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

* [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (22 preceding siblings ...)
  2014-10-03 17:55 ` ubizjak at gmail dot com
@ 2014-10-03 18:08 ` jakub at gcc dot gnu.org
  2014-10-03 18:10 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-10-03 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #27 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Shouldn't it be guarded by if (ksvd.ignored_set_reg) too?


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

* [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (23 preceding siblings ...)
  2014-10-03 18:08 ` jakub at gcc dot gnu.org
@ 2014-10-03 18:10 ` ubizjak at gmail dot com
  2014-10-09  6:36 ` uros at gcc dot gnu.org
                   ` (2 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: ubizjak at gmail dot com @ 2014-10-03 18:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #27)
> Shouldn't it be guarded by if (ksvd.ignored_set_reg) too?

Yes, and the published patch implements just that.
>From gcc-bugs-return-463220-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 03 18:16:47 2014
Return-Path: <gcc-bugs-return-463220-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18299 invoked by alias); 3 Oct 2014 18:16:47 -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 18263 invoked by uid 55); 3 Oct 2014 18:16:43 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/61403] An opportunity for x86 gcc vectorizer (~40% gain)
Date: Fri, 03 Oct 2014 18:16:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61403-4-tI2XQJvh70@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61403-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61403-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: 2014-10/txt/msg00241.txt.bz2
Content-length: 722

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida403

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Oct  3 18:16:09 2014
New Revision: 215866

URL: https://gcc.gnu.org/viewcvs?rev!5866&root=gcc&view=rev
Log:
    PR tree-optimization/61403
    * config/i386/i386.c (expand_vec_perm_palignr): Fix a spelling
    error in comment.  Also optimize 256-bit vectors for AVX2
    or AVX (floating vectors only), provided the first permutation
    can be performed in one insn.

    * gcc.dg/torture/vshuf-32.inc: Add a new test 29.

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


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

* [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (24 preceding siblings ...)
  2014-10-03 18:10 ` ubizjak at gmail dot com
@ 2014-10-09  6:36 ` uros at gcc dot gnu.org
  2014-10-09  8:22 ` uros at gcc dot gnu.org
  2014-10-09  9:06 ` uros at gcc dot gnu.org
  27 siblings, 0 replies; 29+ messages in thread
From: uros at gcc dot gnu.org @ 2014-10-09  6:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from uros at gcc dot gnu.org ---
Author: uros
Date: Thu Oct  9 06:36:08 2014
New Revision: 216026

URL: https://gcc.gnu.org/viewcvs?rev=216026&root=gcc&view=rev
Log:
    PR rtl-optimization/57003
    * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
    also check CALL_INSN_FUNCTION_USAGE for clobbers again after
    killing regs_invalidated_by_call.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/regcprop.c


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

* [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (25 preceding siblings ...)
  2014-10-09  6:36 ` uros at gcc dot gnu.org
@ 2014-10-09  8:22 ` uros at gcc dot gnu.org
  2014-10-09  9:06 ` uros at gcc dot gnu.org
  27 siblings, 0 replies; 29+ messages in thread
From: uros at gcc dot gnu.org @ 2014-10-09  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #30 from uros at gcc dot gnu.org ---
Author: uros
Date: Thu Oct  9 08:22:23 2014
New Revision: 216030

URL: https://gcc.gnu.org/viewcvs?rev=216030&root=gcc&view=rev
Log:
    Backport from mainline
    2014-10-09  Uros Bizjak  <ubizjak@gmail.com>

    PR rtl-optimization/57003
    * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
    also check CALL_INSN_FUNCTION_USAGE for clobbers again after
    killing regs_invalidated_by_call.


Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/regcprop.c


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

* [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
  2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
                   ` (26 preceding siblings ...)
  2014-10-09  8:22 ` uros at gcc dot gnu.org
@ 2014-10-09  9:06 ` uros at gcc dot gnu.org
  27 siblings, 0 replies; 29+ messages in thread
From: uros at gcc dot gnu.org @ 2014-10-09  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #31 from uros at gcc dot gnu.org ---
Author: uros
Date: Thu Oct  9 09:05:37 2014
New Revision: 216035

URL: https://gcc.gnu.org/viewcvs?rev=216035&root=gcc&view=rev
Log:
    Backport from mainline
    2014-10-09  Uros Bizjak  <ubizjak@gmail.com>

    PR rtl-optimization/57003
    * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
    also check CALL_INSN_FUNCTION_USAGE for clobbers again after
    killing regs_invalidated_by_call.


Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/regcprop.c


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

end of thread, other threads:[~2014-10-09  9:06 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
2013-04-19  0:55 ` [Bug middle-end/57003] " pinskia at gcc dot gnu.org
2013-04-19  1:00 ` pinskia at gcc dot gnu.org
2013-04-19  8:26 ` rguenth at gcc dot gnu.org
2013-04-21 14:22 ` dank at kegel dot com
2013-04-21 18:06 ` pinskia at gcc dot gnu.org
2013-04-22 16:39 ` dank at kegel dot com
2013-04-23  9:44 ` kirill.k.smirnov at math dot spbu.ru
2013-04-23  9:51 ` jakub at gcc dot gnu.org
2013-04-23 15:57 ` kirill.k.smirnov at math dot spbu.ru
2013-04-23 16:00 ` jakub at gcc dot gnu.org
2013-04-23 21:33 ` kirill.k.smirnov at math dot spbu.ru
2013-04-23 22:01 ` kirill.k.smirnov at math dot spbu.ru
2013-04-24  9:25 ` bernds at gcc dot gnu.org
2013-04-24 16:06 ` kirill.k.smirnov at math dot spbu.ru
2013-04-24 16:50 ` [Bug rtl-optimization/57003] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
2013-04-24 18:24 ` jakub at gcc dot gnu.org
2013-04-24 18:45 ` jakub at gcc dot gnu.org
2013-04-25  7:51 ` jakub at gcc dot gnu.org
2013-04-25  9:54 ` jakub at gcc dot gnu.org
2013-04-25 10:12 ` bernds at gcc dot gnu.org
2013-04-26 17:50 ` kirill.k.smirnov at math dot spbu.ru
2014-10-03 14:24 ` [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc " ubizjak at gmail dot com
2014-10-03 17:55 ` ubizjak at gmail dot com
2014-10-03 18:08 ` jakub at gcc dot gnu.org
2014-10-03 18:10 ` ubizjak at gmail dot com
2014-10-09  6:36 ` uros at gcc dot gnu.org
2014-10-09  8:22 ` uros at gcc dot gnu.org
2014-10-09  9:06 ` uros 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).