[LLVMbugs] [Bug 12375] New: Loop with pointer IV not statically evaluated.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 27 12:36:54 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12375

             Bug #: 12375
           Summary: Loop with pointer IV not statically evaluated.
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: benny.kra at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Test case from GCC PR27039:

int foo (int *p)
{
  int i = 0, *x;

  for (x = p; x < p + 2; x++)
    i++;

  return i;
}

Should fold to "return 2;". Not optimized with clang -O3 at the moment.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list