[LLVMbugs] [Bug 5436] New: scalarrepl wrong simplification (confused by [0 x i8]?)

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Nov 9 01:16:37 PST 2009


           Summary: scalarrepl wrong simplification (confused by [0 x i8]?)
           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

Created an attachment (id=3791)
 --> (http://llvm.org/bugs/attachment.cgi?id=3791)
testcase .ll

What should get stored is: 2 at offset 0, 72 at offset 4, 105 at offset 8,
but after -scalarrepl only the 105 store is left, and is at the wrong offset.
Here's the bad output (I added -instcombine to make it easier to read):

$ opt -scalarrepl -instcombine bad.2.ll -S -o -
define %base* @c330001_0__indef_func_1() {
  %0 = call i32 @system__secondary_stack__ss_allocate(i32 24) ; <i32> [#uses=2]
  %1 = inttoptr i32 %0 to %base*                  ; <%base*> [#uses=1]
  %2 = inttoptr i32 %0 to i32*                    ; <i32*> [#uses=1]
  store i32 105, i32* %2, align 4
  ret %base* %1

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