public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug optimization/15017] [tree-ssa] compare (equal) with casts are not removed Date: Tue, 20 Apr 2004 15:03:00 -0000 [thread overview] Message-ID: <20040420143411.2613.qmail@sources.redhat.com> (raw) In-Reply-To: <20040420010538.15017.pinskia@gcc.gnu.org> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-20 14:34 ------- And here is the tree dump for patches which I have in my local tree (my cast pass and addition to PHI- OPT to work with different types and one which combines the return statements): ;; Function foo (foo) foo (a, b) { <bb 0>: return ((int)a != (int)b); <-- conversion to int not needed } ;; Function foo0 (foo0) foo0 (a) { <bb 0>: return (a != 0); <-- same as a cast to int, I have to think of a better way of doing this. } ;; Function bar (bar) bar (a) { <bb 0>: return (int)a; <-- good code as _Bool is promoted to int by the ABI } ;; Function foo2 (foo2) foo2 () { <bb 0>: return ((int)T.a != (int)T.b); <--- extranous casts } ;; Function foo3 (foo3) foo3 () { <bb 0>: return ((int)as != (int)bs); <--- likewise } ;; Function foo1 (foo1) foo1 (a, b) { <bb 0>: return ((int)a != 0); <--- likewise, and comparision } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15017
next prev parent reply other threads:[~2004-04-20 14:34 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-04-20 1:38 [Bug optimization/15017] New: " pinskia at gcc dot gnu dot org 2004-04-20 1:45 ` [Bug optimization/15017] " pinskia at gcc dot gnu dot org 2004-04-20 2:25 ` pinskia at gcc dot gnu dot org 2004-04-20 14:44 ` dann at godzilla dot ics dot uci dot edu 2004-04-20 15:03 ` pinskia at gcc dot gnu dot org [this message] 2004-04-20 16:23 ` dann at godzilla dot ics dot uci dot edu 2004-05-18 16:42 ` [Bug tree-optimization/15017] " pinskia at gcc dot gnu dot org 2004-05-24 21:17 ` pinskia at gcc dot gnu dot org 2004-06-07 19:33 ` pinskia at gcc dot gnu dot org 2005-05-02 4:46 ` pinskia at gcc dot gnu dot org 2005-05-02 5:00 ` pinskia at gcc dot gnu dot org 2005-05-02 18:51 ` dann at godzilla dot ics dot uci dot edu 2005-05-04 1:52 ` pinskia at gcc dot gnu dot org 2005-05-08 18:20 ` 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=20040420143411.2613.qmail@sources.redhat.com \ --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).