From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26562 invoked by alias); 1 Sep 2005 02:31:57 -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 26185 invoked by uid 48); 1 Sep 2005 02:31:52 -0000 Date: Thu, 01 Sep 2005 02:31:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050901023151.23673.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/23673] New: fold does not fold (a^b) != 0 to a != b X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg00027.txt.bz2 List-Id: These two functions should be the same on the tree level but are not: int f(int a, int b) { return (a^b) != 0; } int f1(int a, int b) { return a != b; } They do result in the same asm though. Another one from LLVM. -- Summary: fold does not fold (a^b) != 0 to a != b Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization, TREE Severity: enhancement Priority: P2 Component: middle-end 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=23673