[LLVMbugs] [Bug 11409] New: SCEV fails to take advantage of nsw

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 20 01:11:21 PST 2011


             Bug #: 11409
           Summary: SCEV fails to take advantage of nsw
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

opt -O2 does a pretty decent job of handling this loop:

  int f(int i) { int j, k = 0; for (j = i; j < i + 10; ++j) ++k; return k; } 

but it's not taking advantage of the no-signed-wrap property. GCC optimizes it
straight down to "return 10".

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