public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/24659]  New: Conversions are not vectorized
@ 2005-11-03 16:21 uros at kss-loka dot si
  2005-11-03 16:25 ` [Bug tree-optimization/24659] " pinskia at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: uros at kss-loka dot si @ 2005-11-03 16:21 UTC (permalink / raw)
  To: gcc-bugs

Following code should produce a cvtps2pd and cvtpi2pd instructions that operate
on vectors:

void test_fp (float *a, double *b)
{
  int i;

  for (i = 0; i < 4; i++)
    b[i] = (double) a[i];
}

void test_int (int *a, double *b)
{
  int i;

  for (i = 0; i < 4; i++)
    b[i] = (double) a[i];
}

Currently, gcc produces scalar instructions
(gcc -O2 -march=pentium4 -mfpmath=sse -ftree-vectorize):

.L2:
        movss   -4(%ecx,%eax,4), %xmm0
        cvtss2sd        %xmm0, %xmm0
        movsd   %xmm0, -8(%edx,%eax,8)
        addl    $1, %eax
        cmpl    $5, %eax
        jne     .L2

and
.L9:
        cvtsi2sd        -4(%ecx,%eax,4), %xmm0
        movsd   %xmm0, -8(%edx,%eax,8)
        addl    $1, %eax
        cmpl    $5, %eax
        jne     .L9

(BTW: There is also one movss too many in the first example.)


-- 
           Summary: Conversions are not vectorized
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: uros at kss-loka dot si


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


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

end of thread, other threads:[~2007-06-29 16:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-03 16:21 [Bug tree-optimization/24659] New: Conversions are not vectorized uros at kss-loka dot si
2005-11-03 16:25 ` [Bug tree-optimization/24659] " pinskia at gcc dot gnu dot org
2005-11-03 17:11 ` dorit at il dot ibm dot com
2007-01-05 18:27 ` stuart at apple dot com
2007-01-05 18:30 ` stuart at apple dot com
2007-01-05 18:39 ` pinskia at gcc dot gnu dot org
2007-01-06 17:47 ` ubizjak at gmail dot com
2007-01-07  8:03 ` tehila at il dot ibm dot com
2007-04-21 18:43 ` ubizjak at gmail dot com
2007-04-22 18:45 ` uros at gcc dot gnu dot org
2007-04-22 19:08 ` ubizjak at gmail dot com
2007-04-22 19:10 ` ubizjak at gmail dot com
2007-05-15 14:07 ` ubizjak at gmail dot com
2007-05-17  6:31 ` uros at gcc dot gnu dot org
2007-05-17  6:46 ` ubizjak at gmail dot com
2007-05-17  7:29 ` ubizjak at gmail dot com
2007-06-29  8:53 ` ubizjak at gmail dot com
2007-06-29 10:30 ` uros at gcc dot gnu dot org
2007-06-29 10:38 ` ubizjak at gmail dot com
2007-06-29 16:46 ` dorit at il dot ibm dot com

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