public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "falk at debian dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug optimization/14052] New: Combiner weakness Date: Fri, 06 Feb 2004 22:47:00 -0000 [thread overview] Message-ID: <20040206224705.14052.falk@debian.org> (raw) For this code: int f1(int x) { return x == 1 || x == 3; } int f2(int x) { return x == 1 || x == 3 || x == 1; } I get: 0000000000000000 <f1>: 0: a1 75 00 42 cmpeq a0,0x3,t0 4: a0 35 00 42 cmpeq a0,0x1,v0 8: 00 04 01 44 or v0,t0,v0 c: 01 80 fa 6b ret 0000000000000010 <f2>: 10: a0 35 00 42 cmpeq a0,0x1,v0 14: a2 75 00 42 cmpeq a0,0x3,t1 18: 01 04 02 44 or v0,t1,t0 1c: a0 03 e0 43 cmpult zero,v0,v0 20: c0 34 20 44 cmovne t0,0x1,v0 24: 01 80 fa 6b ret combine should have realized that t0 has at most the low bit set and cmpult therefore is always false. -- Summary: Combiner weakness 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: falk at debian dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: alphaev68-unknown-linux-gnu GCC host triplet: alphaev68-unknown-linux-gnu GCC target triplet: alphaev68-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14052
next reply other threads:[~2004-02-06 22:47 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-02-06 22:47 falk at debian dot org [this message] 2004-02-06 22:52 ` [Bug optimization/14052] " pinskia at gcc dot gnu dot org 2004-05-09 23:13 ` pinskia at gcc dot gnu dot org 2004-05-26 12:24 ` [Bug tree-optimization/14052] " pinskia at gcc dot gnu dot org 2005-02-15 0:14 ` law at redhat dot com
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=20040206224705.14052.falk@debian.org \ --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).