From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26929 invoked by alias); 20 Apr 2004 01:05:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26922 invoked by uid 48); 20 Apr 2004 01:05:40 -0000 Date: Tue, 20 Apr 2004 01:38:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040420010538.15017.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/15017] New: [tree-ssa] compare (equal) with casts are not removed X-Bugzilla-Reason: CC X-SW-Source: 2004-04/txt/msg01635.txt.bz2 List-Id: 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