public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35363]  New: Missing bit field coalscing optimization
@ 2008-02-25  5:39 xinliangli at gmail dot com
  2008-02-25 11:37 ` [Bug middle-end/35363] " rguenth at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-25  5:39 UTC (permalink / raw)
  To: gcc-bugs

// David Li

struct A{
  int b1: 3;
  int b2: 3;
  int b3: 2;
  int b4: 17;
}a;
void foo()
{
    a.b1 = 2;
    a.b2 = 3;
    a.b4 = 8;
}

This requires one LOAD + one OR + one STORE, but the generate code looks like:

foo:
.LFB2:
        movzbl  a(%rip), %eax
        andl    $-64, %eax
        orl     $26, %eax
        movb    %al, a(%rip)
        movl    a(%rip), %eax
        andl    $-33554177, %eax
        orb     $8, %ah
        movl    %eax, a(%rip)
        ret


-- 
           Summary: Missing bit field coalscing optimization
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: xinliangli at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35363


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <bug-35363-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-11-28  7:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-25  5:39 [Bug middle-end/35363] New: Missing bit field coalscing optimization xinliangli at gmail dot com
2008-02-25 11:37 ` [Bug middle-end/35363] " rguenth at gcc dot gnu dot org
2008-02-25 18:39 ` [Bug target/35363] " pinskia at gcc dot gnu dot org
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
     [not found] <bug-35363-4@http.gcc.gnu.org/bugzilla/>
2010-11-03  0:21 ` xinliangli at gmail dot com
2021-11-28  7:20 ` pinskia at gcc dot gnu.org

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).