public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nmiell at comcast dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/41464]  New: vector loads are unnecessarily split into high and low loads
Date: Thu, 24 Sep 2009 23:14:00 -0000	[thread overview]
Message-ID: <bug-41464-10309@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2009-09-24 23:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 23:14 nmiell at comcast dot net [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-41464-10309@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).