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/49903] [avr] Redundant comparisons in binary-search switch/case expansion
Date: Fri, 29 Jul 2011 16:11:00 -0000	[thread overview]
Message-ID: <bug-49903-4-6ihixZC7wD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49903-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49903

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-29 16:11:12 UTC ---
(In reply to comment #1)
> Johann,
> Would some type of peephole optimization help out on this?

RTL peephole won't work because they operate just inside basic blocks.

Don't know the retionale behind that limitation, appears that it's just for
technical and implementational reasons.  RTL peep need not to be confused by
BBs, just code_labels etc. would bother.

Text peepholes match but it might be tedious and error prone to work out
instructions lengths or the correct instructions if jump offsets don't match.

Maybe a way is in avr_reorg, but it would be quite tedious to work out all
QI/HI/SI signed and unsigned combinations.  And it must ensure that no other
transformation takes place.  There's bunch of special treatment in md and c and
cc0 handling.  E.g. I don't quite understand why jumps clobber cc0; btw not
clobbering cc0 will not fix this PR.


  parent reply	other threads:[~2011-07-29 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29 15:01 [Bug target/49903] New: AVR: Redundant comparisons in binary-seach " gjl at gcc dot gnu.org
2011-07-29 15:08 ` [Bug target/49903] [avr] Redundant comparisons in binary-search " eric.weddington at atmel dot com
2011-07-29 16:11 ` gjl at gcc dot gnu.org [this message]
2011-08-02  0:12 ` rth at gcc dot gnu.org
2011-08-11 17:44 ` gjl at gcc dot gnu.org
2011-08-11 17:44 ` gjl at gcc dot gnu.org
2011-08-12 23:39 ` hp at gcc dot gnu.org
2011-08-14  9:12 ` gjl at gcc dot gnu.org
2011-08-14  9:22 ` gjl at gcc dot gnu.org

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-49903-4-6ihixZC7wD@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).