[LLVMbugs] [Bug 10181] New: jit miscompiles, llc doesn't

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 23 14:02:59 PDT 2011


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

           Summary: jit miscompiles, llc doesn't
           Product: new-bugs
           Version: 2.9
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: AAkN7YjW at mailinator.com
                CC: llvmbugs at cs.uiuc.edu


This works:
 llvm-as < testing.ll | opt -std-compile-opts -disable-simplify-libcalls | llc
> testing.s; gcc testing.s; ./a.exe

This also works:
 llvm-as < testing.ll | opt -std-compile-opts -disable-simplify-libcalls | lli
-force-interpreter=true

This doesn't work (I get a stack dump and no "hello world" output):
 llvm-as < testing.ll | opt -std-compile-opts -disable-simplify-libcalls | lli


---- Program code below ----


@A = internal constant [13 x i8] c"hello world\0A\00"

declare i32 @printf(i8* noalias nocapture,...)

define i32 @main() {

  br label %a

a:
  br label %g

b:
  br label %c

c:
  br label %g

d:
  br label %e

e:
  br label %g

f:
  ret i32 0

g:
  %z = phi i8*
[blockaddress(@main,%b),%a],[blockaddress(@main,%d),%c],[blockaddress(@main,%f),%e]
  %x = getelementptr [13 x i8]* @A, i64 0, i64 0
  call i32 (i8* noalias nocapture,...)* @printf(i8* %x)
  indirectbr i8* %z, [label %b,label %d,label %f]

}

-- 
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