public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/58384] New: [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133.
@ 2013-09-10 15:34 ysrumyan at gmail dot com
2013-09-10 15:36 ` [Bug rtl-optimization/58384] " ysrumyan at gmail dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ysrumyan at gmail dot com @ 2013-09-10 15:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58384
Bug ID: 58384
Summary: [4.9 regression] Runfail on spec2000/253.perlbmk if
lto and pre-reload scheduler is used on x86 after
r200133.
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ysrumyan at gmail dot com
We also assume that arm can have the same problem at given benchmark if -flto
is used to compile since pre-reload scheduler is used by default on it.
The issue can be reproduced at attached test-case extracted from 253.perlbmk
sources (function Perl_pp_entersub, file pp_hot.c).
Before r200133 forward propagation (fwprop1 for rtl) performs substitution of
stored value to subsequent load with the same base, but after this fix does
not.
Looking at assembly files for test-case we can see that
-- before fix --
call realloc
movq (%rbx), %r8
movq %rax, %r9
movq %rax, %rcx
movq 8(%rsp), %rdx
movq %rax, 24(%r8)
movq %rax, (%r8)
jmp .L4
i.e. return value of 'realloc' is copied to %r9 and %rcx which correspondent
to pre temporaries.
-- after fix -- (without pre-reload scheduler)
call realloc
movq (%rbx), %rcx
movq (%rbx), %r8
movq 8(%rsp), %rdx
movq %rax, 24(%rcx)
movq %rax, (%rcx)
movq (%r8), %rcx <--- redundant load
movq %rcx, %rax
jmp .L4
i.w. we can see redundant load from %r8.
But if we turn on pre-reload scheduler, this load will be unlegal hoisted cross
interleaved store (we got RT error on 253.perlbmk) and we can see it in
assembly:
call realloc
movq (%rbx), %r8
movq 8(%rsp), %rdx
movq (%r8), %rcx <--- non-legal code motion
movq %rax, 24(%r8)
movq %rax, (%r8)
movq %rcx, %rax
jmp .L4
To reproduce compile attached test-case with options
-Ofast -march=corei7 -fschedule-insns --param sched-pressure-algorithm=1
-fsched-pressure
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/58384] [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133.
2013-09-10 15:34 [Bug rtl-optimization/58384] New: [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133 ysrumyan at gmail dot com
@ 2013-09-10 15:36 ` ysrumyan at gmail dot com
2013-09-11 8:04 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ysrumyan at gmail dot com @ 2013-09-10 15:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58384
--- Comment #1 from Yuri Rumyantsev <ysrumyan at gmail dot com> ---
Created attachment 30791
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30791&action=edit
test-case to reproduce
This is compile only test which must be compiled with pre-reload scheduler,
i.e.
with '-Ofast -march=corei7 -fschedule-insns --param sched-pressure-algorithm=1
-fsched-pressure' options.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/58384] [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133.
2013-09-10 15:34 [Bug rtl-optimization/58384] New: [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133 ysrumyan at gmail dot com
2013-09-10 15:36 ` [Bug rtl-optimization/58384] " ysrumyan at gmail dot com
@ 2013-09-11 8:04 ` rguenth at gcc dot gnu.org
2013-11-01 8:32 ` izamyatin at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-11 8:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58384
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*
Target Milestone|--- |4.9.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/58384] [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133.
2013-09-10 15:34 [Bug rtl-optimization/58384] New: [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133 ysrumyan at gmail dot com
2013-09-10 15:36 ` [Bug rtl-optimization/58384] " ysrumyan at gmail dot com
2013-09-11 8:04 ` rguenth at gcc dot gnu.org
@ 2013-11-01 8:32 ` izamyatin at gmail dot com
2013-11-01 9:48 ` ysrumyan at gmail dot com
2013-11-05 13:54 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: izamyatin at gmail dot com @ 2013-11-01 8:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58384
Igor Zamyatin <izamyatin at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |izamyatin at gmail dot com
--- Comment #3 from Igor Zamyatin <izamyatin at gmail dot com> ---
Yeah, it is fixed now, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/58384] [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133.
2013-09-10 15:34 [Bug rtl-optimization/58384] New: [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133 ysrumyan at gmail dot com
` (2 preceding siblings ...)
2013-11-01 8:32 ` izamyatin at gmail dot com
@ 2013-11-01 9:48 ` ysrumyan at gmail dot com
2013-11-05 13:54 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ysrumyan at gmail dot com @ 2013-11-01 9:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58384
--- Comment #4 from Yuri Rumyantsev <ysrumyan at gmail dot com> ---
I checked that the fix for PR58831 does not cure the issue, but we cab close
this bug since 253.perlbmk is passed now with pre-reload scheduler.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/58384] [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133.
2013-09-10 15:34 [Bug rtl-optimization/58384] New: [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133 ysrumyan at gmail dot com
` (3 preceding siblings ...)
2013-11-01 9:48 ` ysrumyan at gmail dot com
@ 2013-11-05 13:54 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-05 13:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58384
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-05 13:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 15:34 [Bug rtl-optimization/58384] New: [4.9 regression] Runfail on spec2000/253.perlbmk if lto and pre-reload scheduler is used on x86 after r200133 ysrumyan at gmail dot com
2013-09-10 15:36 ` [Bug rtl-optimization/58384] " ysrumyan at gmail dot com
2013-09-11 8:04 ` rguenth at gcc dot gnu.org
2013-11-01 8:32 ` izamyatin at gmail dot com
2013-11-01 9:48 ` ysrumyan at gmail dot com
2013-11-05 13:54 ` rguenth 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).