[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


           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

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

  br label %g

  br label %c

  br label %g

  br label %e

  br label %g

  ret i32 0

  %z = phi i8*
  %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