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