public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113231] x86_64 uses SSE instructions for `*mem <<= const` at -Os
Date: Thu, 04 Jan 2024 09:22:41 +0000 [thread overview]
Message-ID: <bug-113231-4-Bc0nDNL2WX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113231-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113231
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|x86_64 use MMX instructions |x86_64 uses SSE
|for simple shift operations |instructions for `*mem <<=
| |const` at -Os
Last reconfirmed| |2024-01-04
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> Registers conversion cost: 0
In this case we start off with:
```
(insn 6 3 0 2 (parallel [
(set (mem:SI (reg/v/f:DI 100 [ iD.2766 ]) [1 *i_4(D)+0 S4 A32])
(ashift:SI (mem:SI (reg/v/f:DI 100 [ iD.2766 ]) [1 *i_4(D)+0 S4
A32])
(const_int 1 [0x1])))
(clobber (reg:CC 17 flags))
]) "/app/example.cpp":3:8 911 {*ashlsi3_1}
(expr_list:REG_DEAD (reg/v/f:DI 100 [ iD.2766 ])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))
```
Which has 0 registers usage but then STV does not take into account the need
for the load/store for SSE registers.
next prev parent reply other threads:[~2024-01-04 9:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 9:07 [Bug rtl-optimization/113231] New: x86_64 use MMX instructions for simple shift operations denis.campredon at gmail dot com
2024-01-04 9:13 ` [Bug target/113231] " pinskia at gcc dot gnu.org
2024-01-04 9:22 ` pinskia at gcc dot gnu.org [this message]
2024-01-04 12:45 ` [Bug target/113231] x86_64 uses SSE instructions for `*mem <<= const` at -Os ubizjak at gmail dot com
2024-01-04 16:25 ` roger at nextmovesoftware dot com
2024-01-07 17:43 ` cvs-commit at gcc dot gnu.org
2024-01-09 8:57 ` roger at nextmovesoftware 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-113231-4-Bc0nDNL2WX@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).