From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28000 invoked by alias); 1 Sep 2005 01:42:53 -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 27529 invoked by uid 48); 1 Sep 2005 01:42:13 -0000 Date: Thu, 01 Sep 2005 01:42:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050901014208.23666.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/23666] New: Fold does not reduce C - ~a into a + (C+1) X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg00012.txt.bz2 List-Id: The asm for the following two functions should be the same. int f(int a) { return 10 - ~a; } int f1(int a) { return a + 11; } Found while reading LLVM's instruction combiner. -- Summary: Fold does not reduce C - ~a into a + (C+1) Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization 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 OtherBugsDependingO 19987 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23666