From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56047 invoked by alias); 13 Aug 2015 20:56:37 -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 56001 invoked by uid 48); 13 Aug 2015 20:56:33 -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: Thu, 13 Aug 2015 20:56: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-08/txt/msg00938.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66511 --- Comment #3 from Georg-Johann Lay --- (In reply to Matthijs Kooijman from comment #2) > So, IIUC, this is quite hard to fix? Either you use lib functions, which > prevents the optimizer from just relabeling or coyping registers to apply > shifting, or you don't and then more complex operations will become very > verbose and messy? avr-gcc is using lib functions, but not as libcall but as transparent call instead. You'll find the implementation in avr-dimode.md. avr-gcc has no proper DImode support. For reasoning cf. the comments in the head of that file.