• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
2; XFAIL: mingw32,win32
3; UNSUPPORTED: powerpc64-unknown-linux-gnu
4; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
5
6@count = global i32 1, align 4
7
8define i32 @main() nounwind {
9entry:
10  %retval = alloca i32, align 4
11  %i = alloca i32, align 4
12  store i32 0, i32* %retval
13  store i32 0, i32* %i, align 4
14  br label %for.cond
15
16for.cond:                                         ; preds = %for.inc, %entry
17  %0 = load i32, i32* %i, align 4
18  %cmp = icmp slt i32 %0, 49
19  br i1 %cmp, label %for.body, label %for.end
20
21for.body:                                         ; preds = %for.cond
22  %1 = load i32, i32* @count, align 4
23  %inc = add nsw i32 %1, 1
24  store i32 %inc, i32* @count, align 4
25  br label %for.inc
26
27for.inc:                                          ; preds = %for.body
28  %2 = load i32, i32* %i, align 4
29  %inc1 = add nsw i32 %2, 1
30  store i32 %inc1, i32* %i, align 4
31  br label %for.cond
32
33for.end:                                          ; preds = %for.cond
34  %3 = load i32, i32* @count, align 4
35  %sub = sub nsw i32 %3, 50
36  ret i32 %sub
37}
38