public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "joey.ye at arm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/54742] Switch elimination in FSM loop
Date: Fri, 08 Mar 2013 03:56:00 -0000	[thread overview]
Message-ID: <bug-54742-4-i8rdJLRo4D@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54742-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #8 from Joey Ye <joey.ye at arm dot com> 2013-03-08 03:56:38 UTC ---
// A none loop case shows how minor changes impacts current jump thread
behavior

int foo(int state, int check)
{
    switch (state) {
        case 0:
            state = 1;
            zoo_0();
            break;
        case 1:
        default:
            state = 0;
            zoo_1();
            break;
    }

    if (!check) return 0;
    //check++;  // Uncomment it results will disable jump thread
    //check=foo();  // Uncomment it results will disable jump thread

    switch (state) {
        case 0:
            bar_0();
            break;
        case 1:
        default:
            bar_1();
            break;
    }
    return check;
}


  parent reply	other threads:[~2013-03-08  3:56 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-29  3:16 [Bug tree-optimization/54742] New: " joey.ye at arm dot com
2012-09-29  3:21 ` [Bug tree-optimization/54742] " pinskia at gcc dot gnu.org
2012-10-01 10:19 ` rguenth at gcc dot gnu.org
2012-10-10  7:37 ` joey.ye at arm dot com
2013-02-19 10:27 ` rguenth at gcc dot gnu.org
2013-03-04  8:27 ` venkataramanan.kumar at amd dot com
2013-03-04  8:34 ` venkataramanan.kumar at amd dot com
2013-03-04 16:56 ` law at redhat dot com
2013-03-08  3:56 ` joey.ye at arm dot com [this message]
2013-05-02  0:11 ` sje at gcc dot gnu.org
2013-11-20  7:23 ` law at redhat dot com
2013-11-20  7:23 ` StaffLeavers at arm dot com
2013-11-20  7:24 ` StaffLeavers at arm dot com
2013-11-20  7:25 ` StaffLeavers at arm dot com
2013-11-20  7:26 ` StaffLeavers at arm dot com
2013-11-20  7:26 ` StaffLeavers at arm dot com
2013-11-20  7:26 ` StaffLeavers at arm dot com
2013-11-20  7:26 ` StaffLeavers at arm dot com
2013-11-20  7:27 ` StaffLeavers at arm dot com
2013-11-20  7:27 ` StaffLeavers at arm dot com
2013-11-20  7:28 ` StaffLeavers at arm dot com
2013-11-20  7:28 ` StaffLeavers at arm dot com
2013-11-20  7:28 ` StaffLeavers at arm dot com
2013-11-20  7:29 ` StaffLeavers at arm dot com
2013-11-20  7:31 ` StaffLeavers at arm dot com
2013-11-22 19:30 ` law at redhat dot com
2013-11-27 12:11 ` jgreenhalgh at gcc dot gnu.org
2013-11-27 12:15 ` jgreenhalgh at gcc dot gnu.org
2013-12-11 18:43 ` izamyatin at gmail dot com
2013-12-11 18:48 ` law at redhat dot com
2013-12-12 11:22 ` izamyatin at gmail dot com
2013-12-13 11:05 ` rguenth at gcc dot gnu.org
2013-12-25 13:48 ` izamyatin at gmail dot com
2014-02-17 10:07 ` joey.ye at arm dot com
2014-02-19 11:22 ` joey.ye at arm dot com
2014-06-28 15:45 ` spop at gcc dot gnu.org
2014-08-12 22:49 ` sje at gcc dot gnu.org
2014-12-06 19:20 ` spop at gcc dot gnu.org
2014-12-06 19:23 ` spop at gcc dot gnu.org
2015-01-14 10:23 ` yroux at gcc dot gnu.org
2023-12-15 18:21 ` pinskia 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-54742-4-i8rdJLRo4D@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).