40 lines · plain
1; RUN: %lli -jit-kind=mcjit -remote-mcjit -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target %s2; XFAIL: target={{.*-windows-(gnu|msvc)}}3; REQUIRES: thread_support4; UNSUPPORTED: target=powerpc64-unknown-linux-gnu5; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed6 7define i32 @main() nounwind {8entry:9 call void @lazily_compiled_address_is_consistent()10 ret i32 011}12 13; Test PR3043: @test should have the same address before and after14; it's JIT-compiled.15@funcPtr = common global ptr null, align 416@lcaic_failure = internal constant [46 x i8] c"@lazily_compiled_address_is_consistent failed\00"17 18define void @lazily_compiled_address_is_consistent() nounwind {19entry:20 store ptr @test, ptr @funcPtr21 %pass = tail call i1 @test() ; <i32> [#uses=1]22 br i1 %pass, label %pass_block, label %fail_block23pass_block:24 ret void25fail_block:26 call i32 @puts(ptr @lcaic_failure)27 call void @exit(i32 1)28 unreachable29}30 31define i1 @test() nounwind {32entry:33 %tmp = load ptr, ptr @funcPtr34 %eq = icmp eq ptr %tmp, @test35 ret i1 %eq36}37 38declare i32 @puts(ptr) noreturn39declare void @exit(i32) noreturn40