This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/23666] New: Fold does not reduce C - ~a into a + (C+1)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]