1 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
2 ; RUN: -relocation-model=pic -code-model=small %s > /dev/null
3 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
4 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
5 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
7 @count = global i32 1, align 4
9 define i32 @main() nounwind uwtable {
11 %retval = alloca i32, align 4
12 %i = alloca i32, align 4
13 store i32 0, i32* %retval
14 store i32 0, i32* %i, align 4
17 for.cond: ; preds = %for.inc, %entry
18 %0 = load i32, i32* %i, align 4
19 %cmp = icmp slt i32 %0, 49
20 br i1 %cmp, label %for.body, label %for.end
22 for.body: ; preds = %for.cond
23 %1 = load i32, i32* @count, align 4
24 %inc = add nsw i32 %1, 1
25 store i32 %inc, i32* @count, align 4
28 for.inc: ; preds = %for.body
29 %2 = load i32, i32* %i, align 4
30 %inc1 = add nsw i32 %2, 1
31 store i32 %inc1, i32* %i, align 4
34 for.end: ; preds = %for.cond
35 %3 = load i32, i32* @count, align 4
36 %sub = sub nsw i32 %3, 50