diff options
author | Danil Malyshev <dmalyshev@accesssoftek.com> | 2012-03-29 21:46:18 +0000 |
---|---|---|
committer | Danil Malyshev <dmalyshev@accesssoftek.com> | 2012-03-29 21:46:18 +0000 |
commit | 4b0b8ef1b0edc2c343145f6b029c43b00a6f5c13 (patch) | |
tree | 3129fed4802e6e32ce38ca8dc4295d7b0ceffb09 /test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll | |
parent | 6c31ee2b10827583a0fbcb39623fdfb440c917ef (diff) | |
download | external_llvm-4b0b8ef1b0edc2c343145f6b029c43b00a6f5c13.zip external_llvm-4b0b8ef1b0edc2c343145f6b029c43b00a6f5c13.tar.gz external_llvm-4b0b8ef1b0edc2c343145f6b029c43b00a6f5c13.tar.bz2 |
Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll')
-rw-r--r-- | test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll b/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll new file mode 100644 index 0000000..4a790c6 --- /dev/null +++ b/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll @@ -0,0 +1,34 @@ +; RUN: %lli -use-mcjit %s > /dev/null + +@count = global i32 1, align 4 + +define i32 @main() nounwind uwtable { +entry: + %retval = alloca i32, align 4 + %i = alloca i32, align 4 + store i32 0, i32* %retval + store i32 0, i32* %i, align 4 + br label %for.cond + +for.cond: ; preds = %for.inc, %entry + %0 = load i32* %i, align 4 + %cmp = icmp slt i32 %0, 49 + br i1 %cmp, label %for.body, label %for.end + +for.body: ; preds = %for.cond + %1 = load i32* @count, align 4 + %inc = add nsw i32 %1, 1 + store i32 %inc, i32* @count, align 4 + br label %for.inc + +for.inc: ; preds = %for.body + %2 = load i32* %i, align 4 + %inc1 = add nsw i32 %2, 1 + store i32 %inc1, i32* %i, align 4 + br label %for.cond + +for.end: ; preds = %for.cond + %3 = load i32* @count, align 4 + %sub = sub nsw i32 %3, 50 + ret i32 %sub +} |