public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr
@ 2010-01-06 23:10 janis at gcc dot gnu dot org
2010-01-06 23:12 ` [Bug tree-optimization/42640] " janis at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: janis at gcc dot gnu dot org @ 2010-01-06 23:10 UTC (permalink / raw)
To: gcc-bugs
Benchmark test 175.vpr from SPEC CPU2000 gets incorrect results on
powerpc64-linux when compiled with "-O2 -ftree-loop-distribution", as shown by
a minimized testcase that I'll attach to this PR. The inner loop is:
inode = s_node;
for (iloop = 1; iloop <= 2; iloop++)
{
rr_node[inode].a = i;
rr_node[inode].b = j;
rr_node[inode].c = ipad;
inode = p_node;
}
Expected output:
elm3b149% /home/janis/tools/gcc-trunk-anonsvn-32/bin/gcc -O2 bug.c && ./a.out
rr_node[0] = 1 2 0
rr_node[1] = 1 2 1
rr_node[2] = 1 2 0
rr_node[3] = 1 2 1
Bad output:
elm3b149% /home/janis/tools/gcc-trunk-anonsvn-32/bin/gcc -O2
-ftree-loop-distribution bug.c && ./a.out
rr_node[0] = 1 2 0
rr_node[1] = 1 2 1
rr_node[2] = 0 0 0
rr_node[3] = 0 0 1
The test also fails with GCC 4.4.2.
--
Summary: wrong code for -ftree-loop-distribution in 175.vpr
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/42640] wrong code for -ftree-loop-distribution in 175.vpr
2010-01-06 23:10 [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr janis at gcc dot gnu dot org
@ 2010-01-06 23:12 ` janis at gcc dot gnu dot org
2010-02-08 15:28 ` zsojka at seznam dot cz
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janis at gcc dot gnu dot org @ 2010-01-06 23:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from janis at gcc dot gnu dot org 2010-01-06 23:11 -------
Created an attachment (id=19493)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19493&action=view)
minimized executable testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/42640] wrong code for -ftree-loop-distribution in 175.vpr
2010-01-06 23:10 [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr janis at gcc dot gnu dot org
2010-01-06 23:12 ` [Bug tree-optimization/42640] " janis at gcc dot gnu dot org
@ 2010-02-08 15:28 ` zsojka at seznam dot cz
2010-02-23 19:27 ` janis at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-02-08 15:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from zsojka at seznam dot cz 2010-02-08 15:28 -------
I can reproduce this on x86_64, trunk r156598 and 4.4 r156256.
Also, bootstrap fails for me with BOOT_CFLAGS="-O2 -ftree-loop-distribution":
Comparing stages 2 and 3
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
libiberty/sha1.o differs
make[2]: *** [compare] Error 1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/42640] wrong code for -ftree-loop-distribution in 175.vpr
2010-01-06 23:10 [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr janis at gcc dot gnu dot org
2010-01-06 23:12 ` [Bug tree-optimization/42640] " janis at gcc dot gnu dot org
2010-02-08 15:28 ` zsojka at seznam dot cz
@ 2010-02-23 19:27 ` janis at gcc dot gnu dot org
2010-02-23 20:38 ` bangerth at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janis at gcc dot gnu dot org @ 2010-02-23 19:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janis at gcc dot gnu dot org 2010-02-23 19:27 -------
The minimized testcase and 175.vpr still fail on powerpc64-linux with "-O2
-ftree-loop-distribution" for both -m32 and -m64. With the confirmation in
comment #2 this report ought to be moved from UNCONFIRMED to NEW.
This bug is not a regression from 4.4 but it is a wrong-code bug and ought to
be considered for fixing in 4.5.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/42640] wrong code for -ftree-loop-distribution in 175.vpr
2010-01-06 23:10 [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr janis at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-02-23 19:27 ` janis at gcc dot gnu dot org
@ 2010-02-23 20:38 ` bangerth at gmail dot com
2010-02-23 21:07 ` spop at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bangerth at gmail dot com @ 2010-02-23 20:38 UTC (permalink / raw)
To: gcc-bugs
--
bangerth at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-02-23 20:38:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/42640] wrong code for -ftree-loop-distribution in 175.vpr
2010-01-06 23:10 [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr janis at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-02-23 20:38 ` bangerth at gmail dot com
@ 2010-02-23 21:07 ` spop at gcc dot gnu dot org
2010-03-02 10:23 ` spop at gcc dot gnu dot org
2010-03-02 10:25 ` spop at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-02-23 21:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from spop at gcc dot gnu dot org 2010-02-23 21:07 -------
Reza Yazdani has a patch to fix this.
He's going to post the patch after test.
Sebastian
--
spop at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |reza dot yazdani at amd dot
|dot org |com
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/42640] wrong code for -ftree-loop-distribution in 175.vpr
2010-01-06 23:10 [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr janis at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-02-23 21:07 ` spop at gcc dot gnu dot org
@ 2010-03-02 10:23 ` spop at gcc dot gnu dot org
2010-03-02 10:25 ` spop at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-03-02 10:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from spop at gcc dot gnu dot org 2010-03-02 10:23 -------
Subject: Bug 42640
Author: spop
Date: Tue Mar 2 10:22:30 2010
New Revision: 157161
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157161
Log:
Fix PR42640: Correctly initialize the value of the new induction variable.
2010-03-02 Reza Yazdani <reza.yazdani@amd.com>
PR middle-end/42640
* tree-loop-distribution.c (update_phis_for_loop_copy): Replaced
the assignment from the new induction variable to the assignment
of the value from the original loop PHI function.
* gcc.dg/tree-ssa/pr42640.c: New.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr42640.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-loop-distribution.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/42640] wrong code for -ftree-loop-distribution in 175.vpr
2010-01-06 23:10 [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr janis at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-03-02 10:23 ` spop at gcc dot gnu dot org
@ 2010-03-02 10:25 ` spop at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-03-02 10:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from spop at gcc dot gnu dot org 2010-03-02 10:24 -------
Fixed.
--
spop at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-03-02 10:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-06 23:10 [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr janis at gcc dot gnu dot org
2010-01-06 23:12 ` [Bug tree-optimization/42640] " janis at gcc dot gnu dot org
2010-02-08 15:28 ` zsojka at seznam dot cz
2010-02-23 19:27 ` janis at gcc dot gnu dot org
2010-02-23 20:38 ` bangerth at gmail dot com
2010-02-23 21:07 ` spop at gcc dot gnu dot org
2010-03-02 10:23 ` spop at gcc dot gnu dot org
2010-03-02 10:25 ` spop 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).