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

           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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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
i32]).
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to