1 ; RUN: %lli -relocation-model=pic -code-model=small %s > /dev/null
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386
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, i32* %retval
11 store i32 0, i32* %i, align 4
14 for.cond: ; preds = %for.inc, %entry
15 %0 = load i32, i32* %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, i32* @count, align 4
21 %inc = add nsw i32 %1, 1
22 store i32 %inc, i32* @count, align 4
25 for.inc: ; preds = %for.body
26 %2 = load i32, i32* %i, align 4
27 %inc1 = add nsw i32 %2, 1
28 store i32 %inc1, i32* %i, align 4
31 for.end: ; preds = %for.cond
32 %3 = load i32, i32* @count, align 4
33 %sub = sub nsw i32 %3, 50