From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28507 invoked by alias); 25 Feb 2008 05:39:38 -0000 Received: (qmail 16096 invoked by uid 48); 25 Feb 2008 05:38:52 -0000 Date: Mon, 25 Feb 2008 05:39:00 -0000 Subject: [Bug middle-end/35363] New: Missing bit field coalscing optimization X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "xinliangli at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg02620.txt.bz2 // 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