1 ; RUN: %lli -jit-kind=mcjit -relocation-model=pic -code-model=small %s > /dev/null
2 ; RUN: %lli -lljit-platform=Inactive -relocation-model=pic -code-model=small %s > /dev/null
3 ; XFAIL: target={{(mips|mipsel)-.*}}, target={{(aarch64|arm).*}}, target={{(i686|i386).*}}
5 @count = global i32 1, align 4
7 define i32 @main() nounwind uwtable {
9 %retval = alloca i32, align 4
10 %i = alloca i32, align 4
11 store i32 0, ptr %retval
12 store i32 0, ptr %i, align 4
15 for.cond: ; preds = %for.inc, %entry
16 %0 = load i32, ptr %i, align 4
17 %cmp = icmp slt i32 %0, 49
18 br i1 %cmp, label %for.body, label %for.end
20 for.body: ; preds = %for.cond
21 %1 = load i32, ptr @count, align 4
22 %inc = add nsw i32 %1, 1
23 store i32 %inc, ptr @count, align 4
26 for.inc: ; preds = %for.body
27 %2 = load i32, ptr %i, align 4
28 %inc1 = add nsw i32 %2, 1
29 store i32 %inc1, ptr %i, align 4
32 for.end: ; preds = %for.cond
33 %3 = load i32, ptr @count, align 4
34 %sub = sub nsw i32 %3, 50