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

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).