public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/41464]  New: vector loads are unnecessarily split into high and low loads
@ 2009-09-24 23:14 nmiell at comcast dot net
  2009-09-25  9:06 ` [Bug tree-optimization/41464] " rguenth at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: nmiell at comcast dot net @ 2009-09-24 23:14 UTC (permalink / raw)
  To: gcc-bugs

gcc (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)

The testcase (built with -Wall -O3):

#include <math.h>

void MulPi(float * __attribute__((aligned(16))) i, float *
__attribute__((aligned(16))) f, int n)
{
        for (int j = 0; j < n; j++)
                f[j] = (float) M_PI * i[j];
}

produces the following for the vectorized version of the loop:

.L7:
        movaps  %xmm1, %xmm0            # zero XMM0
        incl    %ecx                    
        movlps  (%rdi,%rax), %xmm0      # load the low half into XMM0
        movhps  8(%rdi,%rax), %xmm0     # load the high half into XMM0
        mulps   %xmm2, %xmm0            # multiply by pi
        movaps  %xmm0, (%rsi,%rax)      # store to memory
        addq    $16, %rax
        cmpl    %r8d, %ecx
        jb      .L7


-- 
           Summary: vector loads are unnecessarily split into high and low
                    loads
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nmiell at comcast dot net
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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


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

end of thread, other threads:[~2010-02-04 20:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-24 23:14 [Bug tree-optimization/41464] New: vector loads are unnecessarily split into high and low loads nmiell at comcast dot net
2009-09-25  9:06 ` [Bug tree-optimization/41464] " rguenth at gcc dot gnu dot org
2009-09-25 17:12 ` nmiell at comcast dot net
2009-09-25 17:34 ` ubizjak at gmail dot com
2009-09-27  8:06 ` irar at il dot ibm dot com
2009-09-27  9:43 ` rguenther at suse dot de
2009-09-27  9:56 ` irar at il dot ibm dot com
2010-01-24 11:52 ` rguenth at gcc dot gnu dot org
2010-01-24 12:10 ` rguenth at gcc dot gnu dot org
2010-02-04 20:29 ` bredelin at ucla dot edu

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