* [Bug gcov-profile/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
@ 2013-12-03 14:51 ` octoploid at yandex dot com
2013-12-03 20:47 ` [Bug target/59003] " octoploid at yandex dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: octoploid at yandex dot com @ 2013-12-03 14:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
Markus Trippelsdorf <octoploid at yandex dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.9 Regression] |[4.9 Regression]
|profiledbootstrap |profiledbootstrap
|miscompiles gcc during |miscompiles gcc during
|stagefeedback |stagefeedback
| |--with-tune=amdfam10
--- Comment #1 from Markus Trippelsdorf <octoploid at yandex dot com> ---
The following is enough to reproduce the issue:
% ../gcc/configure --with-tune=amdfam10 --enable-checking=release
--disable-werror --disable-multilib --enable-languages=c,c++
--with-build-config="bootstrap-lto bootstrap-O3"
% make profiledbootstrap
Maybe it is another target problem?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
2013-12-03 14:51 ` [Bug gcov-profile/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10 octoploid at yandex dot com
@ 2013-12-03 20:47 ` octoploid at yandex dot com
2013-12-03 21:40 ` octoploid at yandex dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: octoploid at yandex dot com @ 2013-12-03 20:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
Markus Trippelsdorf <octoploid at yandex dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Target| |x86_64-*-*
CC| |hubicka at ucw dot cz
Component|gcov-profile |target
--- Comment #2 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Started with r203937.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
2013-12-03 14:51 ` [Bug gcov-profile/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10 octoploid at yandex dot com
2013-12-03 20:47 ` [Bug target/59003] " octoploid at yandex dot com
@ 2013-12-03 21:40 ` octoploid at yandex dot com
2013-12-03 22:41 ` hubicka at ucw dot cz
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: octoploid at yandex dot com @ 2013-12-03 21:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
--- Comment #3 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Switching off misaligned_move_string_pro_epilogues for AMD "fixes"
the issue:
diff --git a/gcc/config/i386/x86-tune.def b/gcc/config/i386/x86-tune.def
index 4c13c3a0ec69..af58b3e1f77e 100644
--- a/gcc/config/i386/x86-tune.def
+++ b/gcc/config/i386/x86-tune.def
@@ -264,7 +264,7 @@ DEF_TUNE (X86_TUNE_SINGLE_STRINGOP, "single_stringop",
m_386 | m_P4_NOCONA)
FIXME: This may actualy be a win on more targets than listed here. */
DEF_TUNE (X86_TUNE_MISALIGNED_MOVE_STRING_PRO_EPILOGUES,
"misaligned_move_string_pro_epilogues",
- m_386 | m_486 | m_CORE_ALL | m_AMD_MULTIPLE | m_GENERIC)
+ m_386 | m_486 | m_CORE_ALL | m_GENERIC)
/* X86_TUNE_USE_SAHF: Controls use of SAHF. */
DEF_TUNE (X86_TUNE_USE_SAHF, "use_sa
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (2 preceding siblings ...)
2013-12-03 21:40 ` octoploid at yandex dot com
@ 2013-12-03 22:41 ` hubicka at ucw dot cz
2013-12-04 12:51 ` octoploid at yandex dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hubicka at ucw dot cz @ 2013-12-03 22:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> ---
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
>
> --- Comment #3 from Markus Trippelsdorf <octoploid at yandex dot com> ---
> Switching off misaligned_move_string_pro_epilogues for AMD "fixes"
> the issue:
We need to figure out why it causes problem for AMD and not for generic/core.
I will
try to reproduce the ICE...
Honza
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (3 preceding siblings ...)
2013-12-03 22:41 ` hubicka at ucw dot cz
@ 2013-12-04 12:51 ` octoploid at yandex dot com
2013-12-04 13:05 ` octoploid at yandex dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: octoploid at yandex dot com @ 2013-12-04 12:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
--- Comment #5 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Looks like gcc/tree-ssa-pre.c gets miscompiled:
Program received signal SIGSEGV, Segmentation fault.
[Switching to process 8327]
0x0000000000d156d3 in get_or_alloc_expr_for_name(tree_node*) [clone
.lto_priv.4065] ()
(gdb) bt
#0 0x0000000000d156d3 in get_or_alloc_expr_for_name(tree_node*) [clone
.lto_priv.4065] ()
#1 0x0000000000f47468 in compute_avail() ()
#2 0x00000000011068cf in (anonymous namespace)::pass_pre::execute() [clone
.lto_priv.5361] ()
#3 0x0000000000c8f3a2 in execute_one_pass(opt_pass*) ()
#4 0x0000000000c9065b in execute_pass_list(opt_pass*) ()
#5 0x0000000000e405f5 in expand_function(cgraph_node*) [clone .lto_priv.5292]
()
#6 0x00000000010ed32b in compile() ()
#7 0x00000000010ed8da in finalize_compilation_unit() ()
#8 0x0000000000ffe208 in c_write_global_declarations() ()
#9 0x00000000010b0c5f in compile_file() ()
#10 0x00000000010b2d14 in toplev_main(int, char**) ()
#11 0x00007ffff7756f90 in __libc_start_main () from /lib/libc.so.6
#12 0x000000000104d236 in _start ()
Is it possible to somehow disassemble slim object files?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (4 preceding siblings ...)
2013-12-04 12:51 ` octoploid at yandex dot com
@ 2013-12-04 13:05 ` octoploid at yandex dot com
2013-12-04 13:07 ` octoploid at yandex dot com
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: octoploid at yandex dot com @ 2013-12-04 13:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
--- Comment #6 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Created attachment 31377
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31377&action=edit
disassemled get_or_alloc_expr_for_name(tree_node*) good
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (5 preceding siblings ...)
2013-12-04 13:05 ` octoploid at yandex dot com
@ 2013-12-04 13:07 ` octoploid at yandex dot com
2013-12-19 15:33 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: octoploid at yandex dot com @ 2013-12-04 13:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
--- Comment #7 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Created attachment 31378
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31378&action=edit
disassemled get_or_alloc_expr_for_name(tree_node*) bad
I've attached the disassembly of get_or_alloc_expr_for_name()
Good: misaligned_move_string_pro_epilogues off
Bad: misaligned_move_string_pro_epilogues on
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (6 preceding siblings ...)
2013-12-04 13:07 ` octoploid at yandex dot com
@ 2013-12-19 15:33 ` rguenth at gcc dot gnu.org
2014-01-21 14:50 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-12-19 15:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (7 preceding siblings ...)
2013-12-19 15:33 ` rguenth at gcc dot gnu.org
@ 2014-01-21 14:50 ` jakub at gcc dot gnu.org
2014-01-21 15:38 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-21 14:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
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> ---
Created attachment 31907
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31907&action=edit
gcc49-pr59003-test.patch
Reduced testcase (with s/amdfam10/sandybridge/ it works just fine).
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (8 preceding siblings ...)
2014-01-21 14:50 ` jakub at gcc dot gnu.org
@ 2014-01-21 15:38 ` jakub at gcc dot gnu.org
2014-01-21 15:56 ` jakub at gcc dot gnu.org
2014-01-21 20:34 ` trippels at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-21 15:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I believe the bug is in expand_small_movmem_or_setmem, if
GET_MODE_SIZE (mode) < size, then we do size / GET_MODE_SIZE (mode) first
stores
starting at destmem's address (correct), but then do just a single store
starting at destmem's address + count - GET_MODE_SIZE (mode), which is not
correct. We should have done again size / GET_MODE_SIZE (mode) stores starting
at destmem's address + count - size.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (9 preceding siblings ...)
2014-01-21 15:38 ` jakub at gcc dot gnu.org
@ 2014-01-21 15:56 ` jakub at gcc dot gnu.org
2014-01-21 20:34 ` trippels at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-21 15:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #31907|0 |1
is obsolete| |
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-01-21
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31908
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31908&action=edit
gcc49-pr59003.patch
Untested fix.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback --with-tune=amdfam10
2013-11-05 13:06 [Bug gcov-profile/59003] New: [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback octoploid at yandex dot com
` (10 preceding siblings ...)
2014-01-21 15:56 ` jakub at gcc dot gnu.org
@ 2014-01-21 20:34 ` trippels at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-01-21 20:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59003
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
CC| |trippels at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #12 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed. Thanks.
^ permalink raw reply [flat|nested] 13+ messages in thread