1 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
2 ; RUN: %lli %s > /dev/null
4 @count = global i32 1, align 4
6 define i32 @main() nounwind uwtable {
8 %retval = alloca i32, align 4
9 %i = alloca i32, align 4
10 store i32 0, ptr %retval
11 store i32 0, ptr %i, align 4
14 for.cond: ; preds = %for.inc, %entry
15 %0 = load i32, ptr %i, align 4
16 %cmp = icmp slt i32 %0, 49
17 br i1 %cmp, label %for.body, label %for.end
19 for.body: ; preds = %for.cond
20 %1 = load i32, ptr @count, align 4
21 %inc = add nsw i32 %1, 1
22 store i32 %inc, ptr @count, align 4
25 for.inc: ; preds = %for.body
26 %2 = load i32, ptr %i, align 4
27 %inc1 = add nsw i32 %2, 1
28 store i32 %inc1, ptr %i, align 4
31 for.end: ; preds = %for.cond
32 %3 = load i32, ptr @count, align 4
33 %sub = sub nsw i32 %3, 50