public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "xinliangli at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/35363] Missing bit field coalescing optimization
Date: Wed, 03 Nov 2010 00:21:00 -0000 [thread overview]
Message-ID: <20101103002100.PVb_gI-wo3gweSM8yXQWFLGAcg30SqpS5YsnRJYKXzQ@z> (raw)
In-Reply-To: <bug-35363-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35363
davidxl <xinliangli at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xinliangli at gmail dot com
Version|4.3.0 |4.6.0
--- Comment #7 from davidxl <xinliangli at gmail dot com> 2010-11-03 00:20:46 UTC ---
(In reply to comment #6)
> The IL after MEM_REF lowering looks like
>
> bar ()
> {
> int D.1193;
> unsigned int D.1192;
> unsigned int D.1191;
> unsigned int D.1190;
> int D.1189;
>
> D.1189 = MEM <int {0}, &a>;
> D.1190 = (unsigned int) D.1189;
> D.1191 = D.1190 & 192;
> D.1192 = D.1191 | 1048602;
> D.1193 = (int) D.1192;
> MEM <int {0}, &a> = D.1193;
> return;
> }
>
> foo ()
> {
> int MEML.2;
> int MEML.1;
> int MEML.0;
>
> MEML.0 = MEM <int {0}, &a>;
> MEML.0 = BIT_FIELD_EXPR <MEML.0, 2, 3, 0>;
> MEM <int {0}, &a> = MEML.0;
> MEML.1 = MEM <int {0}, &a>;
> MEML.1 = BIT_FIELD_EXPR <MEML.1, 3, 3, 3>;
> MEM <int {0}, &a> = MEML.1;
> MEML.2 = MEM <int {0}, &a>;
> MEML.2 = BIT_FIELD_EXPR <MEML.2, 8, 17, 8>;
> MEM <int {0}, &a> = MEML.2;
> return;
> }
LLVM generates expected code:
.Ltmp1:
movl $-33554240, %eax
andl a(%rip), %eax
orl $2074, %eax
movl %eax, a(%rip)
open64 is also bad.
next parent reply other threads:[~2010-11-03 0:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-35363-4@http.gcc.gnu.org/bugzilla/>
2010-11-03 0:21 ` xinliangli at gmail dot com [this message]
2021-11-28 7:20 ` pinskia at gcc dot gnu.org
2008-02-25 5:39 [Bug middle-end/35363] New: Missing bit field coalscing optimization xinliangli at gmail dot com
2008-02-25 18:45 ` [Bug target/35363] Missing bit field coalescing optimization rguenth at gcc dot gnu dot org
2008-02-25 18:50 ` rguenth at gcc dot gnu dot org
2008-02-25 18:52 ` rguenth at gcc dot gnu dot org
2008-02-25 18:54 ` rguenth at gcc dot gnu dot 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=20101103002100.PVb_gI-wo3gweSM8yXQWFLGAcg30SqpS5YsnRJYKXzQ@z \
--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).