From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59212 invoked by alias); 27 Jun 2015 18:07:25 -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 59165 invoked by uid 48); 27 Jun 2015 18:07:21 -0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/66511] [avr] whole-byte shifts not optimized away for uint64_t Date: Sat, 27 Jun 2015 18:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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-06/txt/msg03236.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66511 --- Comment #1 from Georg-Johann Lay --- (In reply to Matthijs Kooijman from comment #0) > I haven't found a readily available 5.x package yet to test. It's the same. > As you can see, the versions operating on 64 bit values preserve the > 8-bit shift (which is very inefficient on AVR), while the versions > running on 32 bit values simply copy the right registers. Lib functions are used because users complained about bloated 64-bit arithmetic. Notice that indide these 64-bit shift functions byte-shifts are used. > The foo32_16 function still has some useless instructions (r27 and r26 > are not part of the return value, not sure why these are set) but that > is probably an unrelated problem. Yes. > I've marked this with component "target", since I think these > optimizations are avr-specific (or at least not applicable to bigger > architectures).