* [Bug rtl-optimization/48181] [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
@ 2011-03-18 14:51 ` rguenth at gcc dot gnu.org
2011-03-22 0:54 ` steven at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-18 14:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.5.3
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-18 14:41:47 UTC ---
I suppose a more reasonable minimum value for this param makes sense ;)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
2011-03-18 14:51 ` [Bug rtl-optimization/48181] " rguenth at gcc dot gnu.org
@ 2011-03-22 0:54 ` steven at gcc dot gnu.org
2011-04-10 10:43 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu.org @ 2011-03-22 0:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.03.21 23:20:59
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
2011-03-18 14:51 ` [Bug rtl-optimization/48181] " rguenth at gcc dot gnu.org
2011-03-22 0:54 ` steven at gcc dot gnu.org
@ 2011-04-10 10:43 ` rguenth at gcc dot gnu.org
2011-04-28 15:00 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-10 10:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (2 preceding siblings ...)
2011-04-10 10:43 ` rguenth at gcc dot gnu.org
@ 2011-04-28 15:00 ` rguenth at gcc dot gnu.org
2012-07-02 11:08 ` [Bug rtl-optimization/48181] [4.5/4.6/4.7/4.8 " rguenth at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28 15:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.5.3 |4.5.4
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-28 14:51:16 UTC ---
GCC 4.5.3 is being released, adjusting target milestone.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.5/4.6/4.7/4.8 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (3 preceding siblings ...)
2011-04-28 15:00 ` rguenth at gcc dot gnu.org
@ 2012-07-02 11:08 ` rguenth at gcc dot gnu.org
2013-01-08 15:17 ` [Bug rtl-optimization/48181] [4.6/4.7/4.8 " jakub at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-02 11:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.5.4 |4.6.4
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-02 11:07:41 UTC ---
The 4.5 branch is being closed, adjusting target milestone.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.6/4.7/4.8 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (4 preceding siblings ...)
2012-07-02 11:08 ` [Bug rtl-optimization/48181] [4.5/4.6/4.7/4.8 " rguenth at gcc dot gnu.org
@ 2013-01-08 15:17 ` jakub at gcc dot gnu.org
2013-01-16 22:49 ` steven at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-08 15:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-08 15:16:52 UTC ---
But then, won't the exact same issues potentially happen in very large
functions where ira_conflicts_p isn't also true, because the conflict table
would be too big? I'd say zero MB conflict table is reasonable parameter
value, it says don't use the conflict table. If table larger than the param
would be needed, no table is created at all.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.6/4.7/4.8 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (5 preceding siblings ...)
2013-01-08 15:17 ` [Bug rtl-optimization/48181] [4.6/4.7/4.8 " jakub at gcc dot gnu.org
@ 2013-01-16 22:49 ` steven at gcc dot gnu.org
2013-01-16 23:08 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu.org @ 2013-01-16 22:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com,
| |steven at gcc dot gnu.org
--- Comment #5 from Steven Bosscher <steven at gcc dot gnu.org> 2013-01-16 22:48:49 UTC ---
(In reply to comment #4)
> But then, won't the exact same issues potentially happen in very large
> functions where ira_conflicts_p isn't also true, because the conflict table
> would be too big?
Yup. 0 is a valid value for the parameter, just exposing a bug somewhere
else.
FWIW I can't reproduce the problem with trunk. I see rcx being saved
and restored around the calls, e.g.:
movq %rcx, (%rsp)
call bar
movq (%rsp), %rcx
and likewise around the second memcpy. Unfortunately (an old) valgrind
on gcc17 doesn't work with with "valgrind -q ./a.out" as in comment #0.
It'd be interesting if and when this PR got fixed. HJ, is this something
you can bisect?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.6/4.7/4.8 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (6 preceding siblings ...)
2013-01-16 22:49 ` steven at gcc dot gnu.org
@ 2013-01-16 23:08 ` jakub at gcc dot gnu.org
2013-04-12 15:17 ` [Bug rtl-optimization/48181] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-16 23:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-16 23:07:19 UTC ---
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192719
fixed this (so, most likely reproduceable by disabling LRA).
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.7/4.8/4.9 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (7 preceding siblings ...)
2013-01-16 23:08 ` jakub at gcc dot gnu.org
@ 2013-04-12 15:17 ` jakub at gcc dot gnu.org
2014-06-12 13:47 ` [Bug rtl-optimization/48181] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 15:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.6.4 |4.7.4
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 15:16:42 UTC ---
GCC 4.6.4 has been released and the branch has been closed.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.7/4.8/4.9/4.10 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (8 preceding siblings ...)
2013-04-12 15:17 ` [Bug rtl-optimization/48181] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2014-06-12 13:47 ` rguenth at gcc dot gnu.org
2014-12-19 13:29 ` [Bug rtl-optimization/48181] [4.8/4.9/5 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.7.4 |4.8.4
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
The 4.7 branch is being closed, moving target milestone to 4.8.4.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.8/4.9/5 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (9 preceding siblings ...)
2014-06-12 13:47 ` [Bug rtl-optimization/48181] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
@ 2014-12-19 13:29 ` jakub at gcc dot gnu.org
2015-03-24 10:46 ` [Bug rtl-optimization/48181] [4.8/4.9 " steven at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.4 |4.8.5
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.8/4.9 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (10 preceding siblings ...)
2014-12-19 13:29 ` [Bug rtl-optimization/48181] [4.8/4.9/5 " jakub at gcc dot gnu.org
@ 2015-03-24 10:46 ` steven at gcc dot gnu.org
2015-06-10 0:49 ` bernhard.kaindl at thalesgroup dot com
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu.org @ 2015-03-24 10:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.8/4.9/5 Regression] |[4.8/4.9 Regression] wrong
|wrong code with -O -fgcse |code with -O -fgcse --param
|--param |ira-max-conflict-table-size
|ira-max-conflict-table-size |=0
|=0 |
--- Comment #10 from Steven Bosscher <steven at gcc dot gnu.org> ---
Not a GCC5 regression. Disabling LRA isn't possible.
Anyway, if disabling LRA would make this bug resurface then it's more likely a
reload (or reload<->IRA interaction) issue than something in IRA.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.8/4.9 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (11 preceding siblings ...)
2015-03-24 10:46 ` [Bug rtl-optimization/48181] [4.8/4.9 " steven at gcc dot gnu.org
@ 2015-06-10 0:49 ` bernhard.kaindl at thalesgroup dot com
2015-06-10 1:28 ` bernhard.kaindl at thalesgroup dot com
2015-06-10 9:05 ` [Bug rtl-optimization/48181] " rguenth at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: bernhard.kaindl at thalesgroup dot com @ 2015-06-10 0:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Bernhard Kaindl <bernhard.kaindl at thalesgroup dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernhard.kaindl@thalesgroup
| |.com
--- Comment #11 from Bernhard Kaindl <bernhard.kaindl at thalesgroup dot com> ---
Checked what Steven Bosscher said in comment #5 and what I understood from
Comment 6 that LRA fixed this issue:
> FWIW I can't reproduce the problem with trunk. I see rcx being saved
> and restored around the calls, e.g.:
>
> movq %rcx, (%rsp)
> call bar
> movq (%rsp), %rcx
>
> and likewise around the second memcpy. Unfortunately (an old) valgrind
> on gcc17 doesn't work with with "valgrind -q ./a.out" as in comment #0.
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192719
> fixed this (so, most likely reproduceable by disabling LRA).
Indeed, gcc-4.8.4 and gcc-4.9.2 save and restore rcx as described,
valgrind-3.10.1 (current release) does not show an error,
and program does not crash at all.
So affected are only gcc-4.5, 4.6 and 4.7,
and only with --param ira-max-conflict-table-size=0 & -fgcse active.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] [4.8/4.9 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (12 preceding siblings ...)
2015-06-10 0:49 ` bernhard.kaindl at thalesgroup dot com
@ 2015-06-10 1:28 ` bernhard.kaindl at thalesgroup dot com
2015-06-10 9:05 ` [Bug rtl-optimization/48181] " rguenth at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: bernhard.kaindl at thalesgroup dot com @ 2015-06-10 1:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
--- Comment #12 from Bernhard Kaindl <bernhard.kaindl at thalesgroup dot com> ---
x86 has no -fno-lra / -mno-lra flag in gcc-4.8.4 and 4.9.2,
so these compilers they can't show this issue.
Thus, the tag [4.8/4.9 Regression] does not apply and should be changed to
[4.5/4.6 regression].
Since 4.5 and 4.6 are closed, this should then be closed with verified/wontfix.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/48181] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
2011-03-18 14:40 [Bug rtl-optimization/48181] New: [4.5/4.6/4.7 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 zsojka at seznam dot cz
` (13 preceding siblings ...)
2015-06-10 1:28 ` bernhard.kaindl at thalesgroup dot com
@ 2015-06-10 9:05 ` rguenth at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-10 9:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.8.0
Resolution|--- |FIXED
Target Milestone|4.8.5 |4.8.0
Summary|[4.8/4.9 Regression] wrong |wrong code with -O -fgcse
|code with -O -fgcse --param |--param
|ira-max-conflict-table-size |ira-max-conflict-table-size
|=0 |=0
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 16+ messages in thread