public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marcin.krotkiewski at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/60086] suboptimal asm generated for a loop (store/load false aliasing)
Date: Fri, 07 Feb 2014 16:43:00 -0000 [thread overview]
Message-ID: <bug-60086-4-diBkgWu8jb@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60086-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60086
--- Comment #8 from Marcin Krotkiewski <marcin.krotkiewski at gmail dot com> ---
(In reply to Andrey Belevantsev from comment #5)
> At this point insn 461 is dead but we do not notice, and it doesn't look
> easy. I think there was some suggestion in the original research for
> killing dead insn copies left after renaming but I don't remember offhand.
Following Alexanders suggestion, I compiled the test code with -mavx -O3
-fselective-scheduling2 -frename-registers. This seems to get rid of the dead
instructions and yields the desired scheduling:
.L5:
vmovapd (%rbx,%rdi), %ymm0
addq $1, %rsi
vmovapd (%r12,%rdi), %ymm3
vaddpd 0(%r13,%rdi), %ymm0, %ymm2
vaddpd (%r14,%rdi), %ymm3, %ymm4
vmovapd %ymm2, (%rbx,%rdi)
vmovapd %ymm4, (%r12,%rdi)
addq $32, %rdi
cmpq %rsi, %rdx
ja .L5
Alexander, I should maybe clarify that the 'good' code was prepared by hand,
modifying the 'bad' asm I got from gcc 4.7. Asm generated by gcc 4.4 was the
same. If that is what you were refering to.
I am a bit confused now. It seems that all fine and the desired asm can be
generated, so there is no real bug. But why is the original code compiled with
-O3 -mavx bad then? Is -fschedule-insns not enabled at -O2?
next prev parent reply other threads:[~2014-02-07 16:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 22:41 [Bug rtl-optimization/60086] New: " marcin.krotkiewski at gmail dot com
2014-02-06 8:28 ` [Bug rtl-optimization/60086] " jakub at gcc dot gnu.org
2014-02-06 9:34 ` marcin.krotkiewski at gmail dot com
2014-02-06 10:10 ` mpolacek at gcc dot gnu.org
2014-02-06 10:22 ` rguenth at gcc dot gnu.org
2014-02-07 8:52 ` abel at gcc dot gnu.org
2014-02-07 8:53 ` abel at gcc dot gnu.org
2014-02-07 14:33 ` amonakov at gcc dot gnu.org
2014-02-07 16:43 ` marcin.krotkiewski at gmail dot com [this message]
2014-02-07 17:21 ` amonakov at gcc dot gnu.org
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-60086-4-diBkgWu8jb@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).