public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14799] New: [tree-ssa] convert a sequence of "if"s to a "switch" statement
@ 2004-03-31 11:24 kazu at cs dot umass dot edu
  2004-05-24 19:41 ` [Bug tree-optimization/14799] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 4+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-31 11:24 UTC (permalink / raw)
  To: gcc-bugs

void bar (void);

void
foo (int a)
{
  if (a == 30)
    bar ();
  else if (a == 31)
    bar ();
  else if (a == 53)
    bar ();
  else if (a == 23)
    bar ();
}

The idea comes from LLVM.
Of course we should do this only if switch statements are expanded in
an (almost?) optimal way.

-- 
           Summary: [tree-ssa] convert a sequence of "if"s to a "switch"
                    statement
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kazu at cs dot umass dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2020-12-01 10:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-14799-4@http.gcc.gnu.org/bugzilla/>
2011-01-14 15:54 ` [Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "switch" statement tom at codesourcery dot com
2020-12-01 10:47 ` cvs-commit at gcc dot gnu.org
2020-12-01 10:52 ` marxin at gcc dot gnu.org
2004-03-31 11:24 [Bug optimization/14799] New: " kazu at cs dot umass dot edu
2004-05-24 19:41 ` [Bug tree-optimization/14799] " pinskia 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).