public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57537] New: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64
@ 2013-06-05 20:43 brooks at gcc dot gnu.org
  2013-06-06 10:44 ` [Bug tree-optimization/57537] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: brooks at gcc dot gnu.org @ 2013-06-05 20:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57537

            Bug ID: 57537
           Summary: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating
                    wrong code on PowerPC64
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: brooks at gcc dot gnu.org

The gcc.dg/vect/slp-widen-mult-half.c test tests autovectorization of this
inner loop:

  for (i = 0; i < N/2; i++)
    {
      out[2*i] = in[2*i] * COEF;
      out2[2*i] = in[2*i] + COEF2;
      out[2*i+1] = in[2*i+1] * COEF;
      out2[2*i+1] = in[2*i+1] + COEF2;
    }


The execution portion of this test is failing on AltiVec-enabled powerpc64
targets on both the 4.8 branch (which is essentially at the point of the 4.8.1
release at the point I tested it) and on trunk.

The symptoms appear to strongly indicate that this is a simple matter of wrong
code generation: the out[] array is zeroed out rather than having the correct
values assigned.  The out2[] array is correct.

In case it helps someone, here is the line of instrumentation code that I added
to the test to investigate the computed values:

 for (i = 0; i < N; i++)
   printf("at %d: %d == %d, %d == %d\n", i, out[i], in[i] * COEF,
          out2[i], in[i] + COEF2);

I also tried putting some nonzero initial values in out[] before the vectorized
loop; the output remains zero, so this is being actively zeroed out.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-12 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-05 20:43 [Bug tree-optimization/57537] New: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64 brooks at gcc dot gnu.org
2013-06-06 10:44 ` [Bug tree-optimization/57537] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2013-06-12  7:58 ` jakub at gcc dot gnu.org
2013-06-12 13:15 ` jakub at gcc dot gnu.org
2013-06-12 13:49 ` brooks at gcc dot gnu.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).