public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2
@ 2005-09-20 19:30 raj dot khem at gmail dot com
2005-09-20 19:32 ` [Bug middle-end/23985] " raj dot khem at gmail dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: raj dot khem at gmail dot com @ 2005-09-20 19:30 UTC (permalink / raw)
To: gcc-bugs
GCC 3.4.3 and 3.4.4 generated wrong code at -O2 and -Os opt level for the
attached testcase. If I user -O1 the test case works fine.
Secondly it also works fine if I specify -O2 -fno-if-convertion2
Thirdly If I comment out
newinfo->fig->shape = *&shape;
line in the testcase it works fine agains.
The testcase can be compile and linked and runtime outputs should match
correct output should be 1
alpha.style = 1
correct output should be 2
alpha.style = 2
in wrong code case. It prints.
correct output should be 1
alpha.style = 254
correct output should be 2
alpha.style = 2
The testcase works fine with GCC 4.0 and CVS Trunk GCC
--
Summary: [ARM] Wrong code generation with -O2
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: raj dot khem at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-unknown-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/23985] [ARM] Wrong code generation with -O2
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
@ 2005-09-20 19:32 ` raj dot khem at gmail dot com
2005-09-20 19:36 ` [Bug rtl-optimization/23985] " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: raj dot khem at gmail dot com @ 2005-09-20 19:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From raj dot khem at gmail dot com 2005-09-20 19:31 -------
Created an attachment (id=9782)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9782&action=view)
Failing testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/23985] [ARM] Wrong code generation with -O2
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
2005-09-20 19:32 ` [Bug middle-end/23985] " raj dot khem at gmail dot com
@ 2005-09-20 19:36 ` pinskia at gcc dot gnu dot org
2005-09-20 19:37 ` [Bug middle-end/23985] " raj dot khem at gmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-20 19:36 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=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/23985] [ARM] Wrong code generation with -O2
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
2005-09-20 19:32 ` [Bug middle-end/23985] " raj dot khem at gmail dot com
2005-09-20 19:36 ` [Bug rtl-optimization/23985] " pinskia at gcc dot gnu dot org
@ 2005-09-20 19:37 ` raj dot khem at gmail dot com
2005-09-20 19:38 ` [Bug rtl-optimization/23985] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: raj dot khem at gmail dot com @ 2005-09-20 19:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From raj dot khem at gmail dot com 2005-09-20 19:37 -------
It fails on GCC 3.3.1 similarily.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|rtl-optimization |middle-end
Keywords|wrong-code |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/23985] [ARM] Wrong code generation with -O2
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
` (2 preceding siblings ...)
2005-09-20 19:37 ` [Bug middle-end/23985] " raj dot khem at gmail dot com
@ 2005-09-20 19:38 ` pinskia at gcc dot gnu dot org
2005-09-30 10:13 ` rearnsha at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-20 19:38 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |rtl-optimization
Keywords| |wrong-code
Known to fail| |3.3.1 3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/23985] [ARM] Wrong code generation with -O2
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
` (3 preceding siblings ...)
2005-09-20 19:38 ` [Bug rtl-optimization/23985] " pinskia at gcc dot gnu dot org
@ 2005-09-30 10:13 ` rearnsha at gcc dot gnu dot org
2005-09-30 10:58 ` [Bug rtl-optimization/23985] [3.4 regression] Memory aliasing information incorrect in inlined memcpy rearnsha at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-09-30 10:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-09-30 10:13 -------
Confirmed by visual inspection of the assembly code.
What seems to be happening is this:
After if conversion we have (pseudo code)
a ? alpha.style = 1
a ? ...
!a ? alpha.style = 2
!a ? ...
inlined_memcpy(newinfo->fig->alpha, alpha, sizeof (alpha)
and this is transformed by the scheduler into
a ? alpha.style = 1
a ? ...
!a ? ...
inlined_memcpy(newinfo->fig->alpha, alpha, sizeof (alpha))
!a ? alpha.style = 2
That is, alpha.style is only set to 2 after alpha has been copied elsewhere.
Disabling sched-2 also avoids the problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail|3.3.1 3.4.3 |3.3.1 3.4.3 3.4.5
Last reconfirmed|0000-00-00 00:00:00 |2005-09-30 10:13:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/23985] [3.4 regression] Memory aliasing information incorrect in inlined memcpy
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
` (4 preceding siblings ...)
2005-09-30 10:13 ` rearnsha at gcc dot gnu dot org
@ 2005-09-30 10:58 ` rearnsha at gcc dot gnu dot org
2005-09-30 10:59 ` [Bug target/23985] " rearnsha at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-09-30 10:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-09-30 10:58 -------
testing a fix
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rearnsha at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Summary|[ARM] Wrong code generation |[3.4 regression] Memory
|with -O2 |aliasing information
| |incorrect in inlined memcpy
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/23985] [3.4 regression] Memory aliasing information incorrect in inlined memcpy
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
` (5 preceding siblings ...)
2005-09-30 10:58 ` [Bug rtl-optimization/23985] [3.4 regression] Memory aliasing information incorrect in inlined memcpy rearnsha at gcc dot gnu dot org
@ 2005-09-30 10:59 ` rearnsha at gcc dot gnu dot org
2005-10-01 13:31 ` cvs-commit at gcc dot gnu dot org
2005-10-01 13:33 ` rearnsha at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-09-30 10:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-09-30 10:59 -------
This is a bug in the arm backend.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|rtl-optimization |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/23985] [3.4 regression] Memory aliasing information incorrect in inlined memcpy
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
` (6 preceding siblings ...)
2005-09-30 10:59 ` [Bug target/23985] " rearnsha at gcc dot gnu dot org
@ 2005-10-01 13:31 ` cvs-commit at gcc dot gnu dot org
2005-10-01 13:33 ` rearnsha at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-01 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-10-01 13:31 -------
Subject: Bug 23985
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: rearnsha@gcc.gnu.org 2005-10-01 13:31:39
Modified files:
gcc : ChangeLog
gcc/config/arm : arm-protos.h arm.c arm.md
Log message:
PR target/23985
Back-port 2004-08-19 Richard Henderson <rth@redhat.com>
* config/arm/arm.c (arm_gen_load_multiple): Use
adjust_automodify_address. Take base memory and offset instead
of unchanging/struct/scalar bits.
(arm_gen_store_multiple): Likewise.
(arm_gen_movstrqi): Use adjust_automodify_address.
* config/arm/arm-protos.h: Update decls.
* config/arm/arm.md (load_multiple): Update arm_gen_load_multiple call.
(store_multiple): Similarly.
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.918&r2=2.2326.2.919
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm-protos.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.61.4.1&r2=1.61.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.317.4.9&r2=1.317.4.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.154.4.3&r2=1.154.4.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/23985] [3.4 regression] Memory aliasing information incorrect in inlined memcpy
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
` (7 preceding siblings ...)
2005-10-01 13:31 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-01 13:33 ` rearnsha at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-10-01 13:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-10-01 13:33 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23985
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-10-01 13:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-20 19:30 [Bug middle-end/23985] New: [ARM] Wrong code generation with -O2 raj dot khem at gmail dot com
2005-09-20 19:32 ` [Bug middle-end/23985] " raj dot khem at gmail dot com
2005-09-20 19:36 ` [Bug rtl-optimization/23985] " pinskia at gcc dot gnu dot org
2005-09-20 19:37 ` [Bug middle-end/23985] " raj dot khem at gmail dot com
2005-09-20 19:38 ` [Bug rtl-optimization/23985] " pinskia at gcc dot gnu dot org
2005-09-30 10:13 ` rearnsha at gcc dot gnu dot org
2005-09-30 10:58 ` [Bug rtl-optimization/23985] [3.4 regression] Memory aliasing information incorrect in inlined memcpy rearnsha at gcc dot gnu dot org
2005-09-30 10:59 ` [Bug target/23985] " rearnsha at gcc dot gnu dot org
2005-10-01 13:31 ` cvs-commit at gcc dot gnu dot org
2005-10-01 13:33 ` rearnsha at gcc dot gnu dot 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).