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 tree-optimization/65650] New: CCP does not propgate copies


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65650

            Bug ID: 65650
           Summary: CCP does not propgate copies
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org

CCP should be able to optimize the following to return 0; in a single pass
invocation.

int foo (int i)
{
  int j = i;
  int k = 0;
  int l = j + k;
  int m = l - j;
  return m;
}


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