public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/37710]  New: When peeling an ordinary label off a case-table and making it a default label, strip from the end with identical labels.
@ 2008-10-02  0:31 hp at gcc dot gnu dot org
  2008-10-02 11:09 ` [Bug middle-end/37710] " rguenth at gcc dot gnu dot org
  0 siblings, 1 reply; 4+ messages in thread
From: hp at gcc dot gnu dot org @ 2008-10-02  0:31 UTC (permalink / raw)
  To: gcc-bugs

See PR 35809, comment #3
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35809#c3>:
Looking at assembly-code for
gcc.c-torture/execute/pr35800.c at r140821 reveals that the first case is still
arbitrarily taken as the default, where the last one would have been better as
it's repeated 32 times.

So, when a new default-label is to be picked, use the end with identical
labels, and peel all of them off.  If there are no identical labels, use the
end which results in the smallest lower end of the case range. (Usually the
beginning needs to be added or subtracted in the back-end, so a smaller
constant (hopefully zero) usually means a lower cost.


-- 
           Summary: When peeling an ordinary label off a case-table and
                    making it a default label, strip from the end with
                    identical labels.
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hp at gcc dot gnu dot org
GCC target triplet: cris-*-*


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-29  3:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-37710-4@http.gcc.gnu.org/bugzilla/>
2021-08-29  2:47 ` [Bug middle-end/37710] When peeling an ordinary label off a case-table and making it a default label, strip from the end with identical labels pinskia at gcc dot gnu.org
2021-08-29  3:26 ` pinskia at gcc dot gnu.org
2021-08-29  3:30 ` pinskia at gcc dot gnu.org
2008-10-02  0:31 [Bug middle-end/37710] New: " hp at gcc dot gnu dot org
2008-10-02 11:09 ` [Bug middle-end/37710] " rguenth at gcc dot gnu dot org

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).