[LLVMbugs] [Bug 11222] New: suboptimal code generation: integer ranges

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 24 00:10:04 PDT 2011


           Summary: suboptimal code generation: integer ranges
           Product: new-bugs
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: s3734770 at mail.zih.tu-dresden.de
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=7508)
 --> (http://llvm.org/bugs/attachment.cgi?id=7508)
First file: original test case

I have a ParseInt function which is able to parse either a integer or a hex
string (beginning with $). While parsing integers and hex numbers is really
similar, i put them into one function.

The test case is compiled from the following program:
static init
  var i: int = ParseInt('5', 0)

I attached a second file which is the run after opt -O3.
As you see in block vergleich.i in line 54, %testpx.i is compared wether it is
smaller than 10.
In gleich.i, %textpx.i is compared wether it is greater than 9. %gleich.i's
predecessor is %vergleich2.i which predecessor is %vergleich.i
But %vergleich.i only branches into vergleich2.i when %testpx.i is smaller than
10, so it can never become greater than 9.

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