From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67559 invoked by alias); 13 May 2015 15:43:46 -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 67517 invoked by uid 48); 13 May 2015 15:43:41 -0000 From: "kevin at koconnor dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/66110] uint8_t memory access not optimized Date: Wed, 13 May 2015 15:43: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-Version: 5.1.0 X-Bugzilla-Keywords: alias, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: kevin at koconnor dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 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: 2015-05/txt/msg01074.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66110 --- Comment #8 from Kevin OConnor --- Thanks! I can confirm the latest trunk performs the desired optimization. However, this test case still isn't fully optimized: void f2(struct s1 *ps1, uint8_t *pi8) { ps1->f1 = 3; *pi8 = 8; ps1->f1 += 2; } That is, an "uint8_t*" still aliases with every other type. The "struct" optimization is more important for my usage, but it is unfortunate that uint8_t*/int8_t* are pessimized. (In particular, there does not appear to be any way to declare a pointer to an 8 bit integer that doesn't alias every other type.) I can open a separate bugzilla entry on the above.