• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: %lli_mcjit -remote-mcjit -relocation-model=pic -code-model=small %s > /dev/null
2; XFAIL: mips, aarch64, arm, i686, i386
3
4@count = global i32 1, align 4
5
6define i32 @main() nounwind uwtable {
7entry:
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
12  br label %for.cond
13
14for.cond:                                         ; preds = %for.inc, %entry
15  %0 = load i32* %i, align 4
16  %cmp = icmp slt i32 %0, 49
17  br i1 %cmp, label %for.body, label %for.end
18
19for.body:                                         ; preds = %for.cond
20  %1 = load i32* @count, align 4
21  %inc = add nsw i32 %1, 1
22  store i32 %inc, i32* @count, align 4
23  br label %for.inc
24
25for.inc:                                          ; preds = %for.body
26  %2 = load i32* %i, align 4
27  %inc1 = add nsw i32 %2, 1
28  store i32 %inc1, i32* %i, align 4
29  br label %for.cond
30
31for.end:                                          ; preds = %for.cond
32  %3 = load i32* @count, align 4
33  %sub = sub nsw i32 %3, 50
34  ret i32 %sub
35}
36