From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2402 invoked by alias); 2 Apr 2013 14:37:06 -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 2344 invoked by uid 48); 2 Apr 2013 14:36:59 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/52436] BIT_FIELD_REF > should be canonicalized for non-bitfield accesses Date: Tue, 02 Apr 2013 14:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg00126.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52436 --- Comment #6 from Marc Glisse 2013-04-02 14:36:59 UTC --- (In reply to comment #5) > No, get_addr_base_and_unit_offset_1 only is supposed to return the > addressable offset into an object - it doesn't care about access sizes. It is also allowed to say "bad idea, I will return NULL", but ok. > But you can't really do what you do there. You are possibly > transforming [...] Good point, thanks. > which is not correct, obviously. "combining" with memory > accesses isn't trivial, certainly not a task I would consider > for forwprop. I can't think of a suitable existing pass > that would combine this, but value-numbering should eventually > value-number both cases the same at least. I guess that leaves the vector lowering pass as the easiest alternative for PR55266: split all unsupported memory reads into supported reads and a constructor (and similarly, split writes into bit_field_refs and writes) and hope that nothing does the reverse transformation.