[LLVMbugs] [Bug 5282] New: indvars creates wild GEP from tame GEP

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Oct 22 22:52:54 PDT 2009


           Summary: indvars creates wild GEP from tame GEP
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu

Here's the GEP before running "opt -indvars" on the attached testcase:

  %19 = getelementptr inbounds [2147483647 x i32]* %table.11_41, i32 0, i32 %18
; <i32*> [#uses=1]

And here it is afterwards:

  %scevgep = getelementptr [2147483647 x i32]* %table.11_41, i32 %tmp, i32 0 ;
<i32*> [#uses=1]

Note how before the transform we were advancing in units of 4 bytes (i32),
but afterwards we are advancing in units of 8589934588 bytes ([2147483647 x
This crashes the codegenerators, but besides that it seems like a generally
unfortunate thing to do.  Note how the GEP also lost the inbounds flag.

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