This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]