public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kazu at cs dot umass dot edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug optimization/15353] New: [tree-ssa] Merge two "if"s if one subsumes the other. Date: Sun, 09 May 2004 20:07:00 -0000 [thread overview] Message-ID: <20040509200719.15353.kazu@cs.umass.edu> (raw) void bar (void); void foo (int a, int b) { do { if (a < b) break; if (a != b) break; bar (); } while (0); } I get: foo (a, b) { <bb 0>: if (a_1 < b_2) goto <L2>; else goto <L0>; <L0>:; if (a_1 != b_2) goto <L2>; else goto <L1>; <L1>:; bar () [tail call]; <L2>:; return; } Note that the second "if" completely subsumes the first. We would like: foo (a, b) { <bb 0>: if (a_1 == b_2) goto <L0>; else goto <L1>; <L0>:; bar () [tail call]; <L1>:; return; } This comes from shorten_compare from c-common.c. -- Summary: [tree-ssa] Merge two "if"s if one subsumes the other. 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=15353
next reply other threads:[~2004-05-09 20:07 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-05-09 20:07 kazu at cs dot umass dot edu [this message] 2004-05-09 20:49 ` [Bug optimization/15353] " pinskia at gcc dot gnu dot org 2004-05-10 2:06 ` kazu at cs dot umass dot edu 2004-05-25 0:03 ` [Bug tree-optimization/15353] " pinskia at gcc dot gnu dot org 2005-06-11 19:06 ` rguenth at gcc dot gnu dot org 2005-06-11 19:16 ` pinskia at gcc dot gnu dot 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=20040509200719.15353.kazu@cs.umass.edu \ --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: linkBe 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).