public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dwmw2 at infradead dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/55177] missed optimizations with __builtin_bswap Date: Fri, 02 Nov 2012 17:05:00 -0000 [thread overview] Message-ID: <bug-55177-4-2l85c2B3rX@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55177-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55177 --- Comment #3 from David Woodhouse <dwmw2 at infradead dot org> 2012-11-02 17:05:03 UTC --- The first example isn't *that* dumb, as a cut-down test case of real code which may look more complex in reality. If the real code really *is* as simple as my test case, you're right that perhaps we *could* optimise it ourselves by eschewing the normal accessor macros for explicit-endian values, and manually byteswapping the constant instead. But really, we shouldn't *have* to. The compiler can see what's happening, and it can deal with it a whole lot better than we can, especially when it comes to loads and stores. Your argument applies just as well to the second test case. I could just byteswap the constant instead of the variable. But still I shouldn't have to.
next prev parent reply other threads:[~2012-11-02 17:05 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-02 9:59 [Bug tree-optimization/55177] New: Missed optimisation: bswap, mask with constant, bswap back again dwmw2 at infradead dot org 2012-11-02 10:46 ` [Bug tree-optimization/55177] " dwmw2 at infradead dot org 2012-11-02 10:56 ` [Bug rtl-optimization/55177] missed optimizations with __builtin_bswap ebotcazou at gcc dot gnu.org 2012-11-02 17:05 ` dwmw2 at infradead dot org [this message] 2012-11-02 17:46 ` ebotcazou at gcc dot gnu.org 2012-11-02 19:42 ` dwmw2 at infradead dot org 2012-11-02 21:59 ` ebotcazou at gcc dot gnu.org 2012-11-08 14:30 ` dwmw2 at infradead dot org 2012-11-08 16:14 ` ebotcazou at gcc dot gnu.org 2013-03-08 12:12 ` dwmw2 at infradead dot org 2013-03-08 15:19 ` pinskia at gcc dot gnu.org 2013-03-09 0:06 ` ebotcazou at gcc dot gnu.org 2013-03-09 0:16 ` [Bug tree-optimization/55177] " pinskia at gcc dot gnu.org 2014-04-04 12:40 ` krebbel at gcc dot gnu.org 2014-11-22 22:11 ` pinskia at gcc dot gnu.org 2015-01-23 14:00 ` ubizjak at gmail dot com 2015-01-23 14:08 ` dwmw2 at infradead dot org 2015-01-23 14:11 ` ubizjak at gmail dot com 2021-11-15 8:30 ` pinskia at gcc dot gnu.org 2021-11-15 8:35 ` pinskia at gcc dot gnu.org 2021-11-15 9:19 ` pinskia at gcc dot gnu.org 2021-11-17 23:40 ` cvs-commit at gcc dot gnu.org 2021-11-17 23:40 ` pinskia at gcc dot gnu.org 2021-11-17 23:41 ` pinskia 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-55177-4-2l85c2B3rX@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: linkBe 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).