public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/15017] New: [tree-ssa] compare (equal) with casts are not removed
@ 2004-04-20  1:38 pinskia at gcc dot gnu dot org
  2004-04-20  1:45 ` [Bug optimization/15017] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-20  1:38 UTC (permalink / raw)
  To: gcc-bugs

On most targets where _Bool is of size 1 (everywhere except PPC-darwin), the following
code contains sign/zero extends which is bad code:

static _Bool as, bs;
_Bool foo3 (void) {
if (as != bs) return 1;
else  return 0;
}

Likewise for this code also:
static signed char as, bs;
_Bool foo3 (void) {
int as1 = as;
int bs1 = bs;
if (as1 != bs1) return 1;
else  return 0;
}

-- 
           Summary: [tree-ssa] compare (equal) with casts are not removed
           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: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-05-08 18:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-20  1:38 [Bug optimization/15017] New: [tree-ssa] compare (equal) with casts are not removed 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
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

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).