public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tony.poppleton at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/47582] Combine chains of movl into movq
Date: Wed, 10 Jun 2015 16:16:00 -0000	[thread overview]
Message-ID: <bug-47582-4-wyKAnAuNri@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47582-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47582

--- Comment #2 from Tony Poppleton <tony.poppleton at gmail dot com> ---
Re-testing this with GCC 5.1, the code appears to be even less efficient, for
both cases;

DM1:
.LFB0:
        .cfi_startproc
        movss   b(%rip), %xmm0
        xorl    %eax, %eax
        movss   %xmm0, a(%rip)
        movss   b+4(%rip), %xmm0
        movss   %xmm0, a+4(%rip)
        movss   b+8(%rip), %xmm0
        movss   %xmm0, a+8(%rip)
        movss   b+12(%rip), %xmm0
        movss   %xmm0, a+12(%rip)
        movss   b+16(%rip), %xmm0
        movss   %xmm0, a+16(%rip)
        ret
        .cfi_endproc

.LFB0:
        .cfi_startproc
        movq    b(%rip), %rax
        movq    %rax, a(%rip)
        movq    b+8(%rip), %rax
        movq    %rax, a+8(%rip)
        movl    b+16(%rip), %eax
        movl    %eax, a+16(%rip)
        xorl    %eax, %eax
        ret
        .cfi_endproc

Why is the "xorl" appearing in both cases?  Should this be logged as a separate
bug.

Incidentally, compiling with -O1 produces the same code as -O2 on older GCCs
(as in the description comment above)

My total guess is it is due to a and b not having any initial values, and an
optimization that takes into account value ranges is getting confused?


  parent reply	other threads:[~2015-06-10 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 21:36 [Bug rtl-optimization/47582] New: " tony.poppleton at gmail dot com
2011-02-01 22:46 ` [Bug rtl-optimization/47582] " pinskia at gcc dot gnu.org
2015-06-10 16:16 ` tony.poppleton at gmail dot com [this message]
2015-06-10 16:30 ` tony.poppleton at gmail dot com

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-47582-4-wyKAnAuNri@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).