From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27444 invoked by alias); 4 Nov 2013 08:10:50 -0000 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 Received: (qmail 26938 invoked by uid 48); 4 Nov 2013 08:08:47 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58984] [4.8/4.9 Regression] wrong code at -Os and above on x86_64-linux-gnu in 64-bit mode Date: Mon, 04 Nov 2013 08:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00173.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58984 --- Comment #3 from Jakub Jelinek --- So, before IPA-CP, foo had: _10 = BIT_FIELD_REF ; _11 = _10 & 507904; Now, IPA-CP does: Modification phase of node foo.constprop.0/3 Aggregate replacements: 0[14]=1, 0[8]=0, 0[0]=1 _4 = 1; _5 = _4 & 507904; which is of course wrong, because 32 bits at offset 0 in the structure should contain value 16385 ((1 << 0) | (1 << 14)), rather than 1.