This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23666] New: Fold does not reduce C - ~a into a + (C+1)
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Sep 2005 01:42:13 -0000
- Subject: [Bug middle-end/23666] New: Fold does not reduce C - ~a into a + (C+1)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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