* [Bug middle-end/16968] RTX_UNCHANGING_P related miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
@ 2004-08-10 15:44 ` jakub at gcc dot gnu dot org
2004-08-10 15:45 ` [Bug rtl-optimization/16968] " pinskia at gcc dot gnu dot org
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-08-10 15:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2004-08-10 15:44 -------
Created an attachment (id=6911)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6911&action=view)
ppc-const.c testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] RTX_UNCHANGING_P related miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
2004-08-10 15:44 ` [Bug middle-end/16968] " jakub at gcc dot gnu dot org
@ 2004-08-10 15:45 ` pinskia at gcc dot gnu dot org
2004-08-10 15:45 ` pinskia at gcc dot gnu dot org
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-10 15:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |rtl-optimization
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] RTX_UNCHANGING_P related miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
2004-08-10 15:44 ` [Bug middle-end/16968] " jakub at gcc dot gnu dot org
2004-08-10 15:45 ` [Bug rtl-optimization/16968] " pinskia at gcc dot gnu dot org
@ 2004-08-10 15:45 ` pinskia at gcc dot gnu dot org
2004-08-10 15:46 ` jakub at gcc dot gnu dot org
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-10 15:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-10 15:45 -------
I really wish RTX_UNCHANGING_P would die now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] RTX_UNCHANGING_P related miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-08-10 15:45 ` pinskia at gcc dot gnu dot org
@ 2004-08-10 15:46 ` jakub at gcc dot gnu dot org
2004-08-10 15:48 ` jakub at gcc dot gnu dot org
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-08-10 15:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2004-08-10 15:46 -------
*** Bug 16969 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] RTX_UNCHANGING_P related miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-08-10 15:46 ` jakub at gcc dot gnu dot org
@ 2004-08-10 15:48 ` jakub at gcc dot gnu dot org
2004-08-10 16:02 ` jakub at gcc dot gnu dot org
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-08-10 15:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2004-08-10 15:48 -------
On mainline the initialization seems to be done with MEM/s/u, so it looks like
it is 3.4.x only (not sure if it is tree-ssa which cures this or there were
RTX_UNCHANGING_P changes I did not know about).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] RTX_UNCHANGING_P related miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-08-10 15:48 ` jakub at gcc dot gnu dot org
@ 2004-08-10 16:02 ` jakub at gcc dot gnu dot org
2004-08-11 16:13 ` [Bug rtl-optimization/16968] [3.4 only] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-08-10 16:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2004-08-10 16:02 -------
On closer look, this is because loop optimizer doesn't care about asm ("")
being an optimization barrier and happily moves instructions accross it.
It seems at least on this testcase no other optimization attempts to do so
and the testcase works just fine with -O2 -m32 -fno-loop-optimize.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 only] RTX_UNCHANGING_P related miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-08-10 16:02 ` jakub at gcc dot gnu dot org
@ 2004-08-11 16:13 ` pinskia at gcc dot gnu dot org
2004-08-16 10:24 ` [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation giovannibajo at libero dot it
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-11 16:13 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|RTX_UNCHANGING_P related |[3.4 only] RTX_UNCHANGING_P
|miscompilation |related miscompilation
Target Milestone|--- |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-08-11 16:13 ` [Bug rtl-optimization/16968] [3.4 only] " pinskia at gcc dot gnu dot org
@ 2004-08-16 10:24 ` giovannibajo at libero dot it
2004-08-16 10:31 ` jakub at gcc dot gnu dot org
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: giovannibajo at libero dot it @ 2004-08-16 10:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-08-16 10:24 -------
Andrew, can you please confirm this on PPC?
Zdenek, this looks like a miscompilation in the RTL loop optimizer. Can you
please have a look?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org, rakdver at atrey dot
| |karlin dot mff dot cuni dot
| |cz
Known to fail| |3.5.0
Known to work| |3.4.0 3.4.1
Summary|[3.4 only] RTX_UNCHANGING_P |[3.4 Regression] loop
|related miscompilation |optimizer miscompilation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-08-16 10:24 ` [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation giovannibajo at libero dot it
@ 2004-08-16 10:31 ` jakub at gcc dot gnu dot org
2004-08-29 19:02 ` mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-08-16 10:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2004-08-16 10:31 -------
It is miscompiled in 3.4.x, so setting known to work to 3.4.0 and 3.4.1 seems
wrong to me.
GCC 3.5 doesn't miscompile this (it doesn't use asm_input ("") magic),
but the loop bug which is the cause of this problem is most probably there
too (i.e. I think it will happily move asm volatile or asm without output
around while it shouldn't).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-08-16 10:31 ` jakub at gcc dot gnu dot org
@ 2004-08-29 19:02 ` mmitchel at gcc dot gnu dot org
2004-10-22 17:38 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-29 19:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-29 19:02 -------
Postponed until GCC 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.2 |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-08-29 19:02 ` mmitchel at gcc dot gnu dot org
@ 2004-10-22 17:38 ` pinskia at gcc dot gnu dot org
2004-11-01 0:47 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-22 17:38 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail|4.0 |4.0.0
Last reconfirmed|0000-00-00 00:00:00 |2004-10-22 17:38:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-10-22 17:38 ` pinskia at gcc dot gnu dot org
@ 2004-11-01 0:47 ` mmitchel at gcc dot gnu dot org
2004-12-10 10:29 ` ebotcazou at gcc dot gnu dot org
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01 0:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-11-01 00:46 -------
Postponed until GCC 3.4.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.3 |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-11-01 0:47 ` mmitchel at gcc dot gnu dot org
@ 2004-12-10 10:29 ` ebotcazou at gcc dot gnu dot org
2004-12-13 11:02 ` ebotcazou at gcc dot gnu dot org
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-10 10:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-12-10 10:29 -------
Investigating, RTX_UNCHANGING_P was my preferred RTL flag. ;-)
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ebotcazou at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (12 preceding siblings ...)
2004-12-10 10:29 ` ebotcazou at gcc dot gnu dot org
@ 2004-12-13 11:02 ` ebotcazou at gcc dot gnu dot org
2004-12-17 17:11 ` ebotcazou at gcc dot gnu dot org
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-13 11:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-12-13 11:02 -------
Hum... the problem lies in the old loop optimizer, which indeed doesn't care
about optimization barriers. This apparently had had very limited consequences
until we started to emit them more frequently as part of the stopgap solution
for the RTX_UNCHANGING_P. We might need to resort to disabling all
optimizations if we detect such a barrier in a loop.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (13 preceding siblings ...)
2004-12-13 11:02 ` ebotcazou at gcc dot gnu dot org
@ 2004-12-17 17:11 ` ebotcazou at gcc dot gnu dot org
2004-12-18 7:55 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-17 17:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-12-17 17:11 -------
Present on x86 and x86-64 too as of today on 3.4 branch.
--
What |Removed |Added
----------------------------------------------------------------------------
GCC target triplet|powerpc-redhat-linux |
Last reconfirmed|2004-10-22 17:38:25 |2004-12-17 17:11:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (14 preceding siblings ...)
2004-12-17 17:11 ` ebotcazou at gcc dot gnu dot org
@ 2004-12-18 7:55 ` cvs-commit at gcc dot gnu dot org
2004-12-18 7:58 ` cvs-commit at gcc dot gnu dot org
2004-12-18 8:00 ` ebotcazou at gcc dot gnu dot org
17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-18 7:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-18 07:55 -------
Subject: Bug 16968
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: ebotcazou@gcc.gnu.org 2004-12-18 07:55:42
Modified files:
gcc : ChangeLog loop.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/execute: 20041218-1.c
Log message:
PR rtl-optimization/16968
* loop.c (scan_loop): Stop scanning the loop for movable
insns as soon as an optimization barrier is encountered.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6872&r2=2.6873
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/loop.c.diff?cvsroot=gcc&r1=1.517&r2=1.518
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4779&r2=1.4780
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20041218-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (15 preceding siblings ...)
2004-12-18 7:55 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-18 7:58 ` cvs-commit at gcc dot gnu dot org
2004-12-18 8:00 ` ebotcazou at gcc dot gnu dot org
17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-18 7:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-18 07:58 -------
Subject: Bug 16968
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: ebotcazou@gcc.gnu.org 2004-12-18 07:58:12
Modified files:
gcc : ChangeLog loop.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/execute: 20041218-1.c
Log message:
PR rtl-optimization/16968
* loop.c (scan_loop): Stop scanning the loop for movable
insns as soon as an optimization barrier is encountered.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.746&r2=2.2326.2.747
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/loop.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.488.2.5&r2=1.488.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.331&r2=1.3389.2.332
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20041218-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug rtl-optimization/16968] [3.4 Regression] loop optimizer miscompilation
2004-08-10 15:43 [Bug middle-end/16968] New: RTX_UNCHANGING_P related miscompilation jakub at gcc dot gnu dot org
` (16 preceding siblings ...)
2004-12-18 7:58 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-18 8:00 ` ebotcazou at gcc dot gnu dot org
17 siblings, 0 replies; 19+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-18 8:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-12-18 08:00 -------
See http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01315.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16968
^ permalink raw reply [flat|nested] 19+ messages in thread