public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gjl at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-66511-4-VfdgnrgJJE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66511-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66511

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(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).


  parent reply	other threads:[~2015-06-27 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 14:49 [Bug target/66511] New: " matthijs at stdin dot nl
2015-06-27 17:52 ` [Bug target/66511] " gjl at gcc dot gnu.org
2015-06-27 18:07 ` gjl at gcc dot gnu.org [this message]
2015-08-02 11:42 ` matthijs at stdin dot nl
2015-08-13 20:56 ` gjl at gcc dot gnu.org
2023-04-16 12:51 ` roger at nextmovesoftware dot com
2023-04-16 17:27 ` klaus.doldinger64 at googlemail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-66511-4-VfdgnrgJJE@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).