diff options
author | Danil Malyshev <dmalyshev@accesssoftek.com> | 2012-05-17 21:07:47 +0000 |
---|---|---|
committer | Danil Malyshev <dmalyshev@accesssoftek.com> | 2012-05-17 21:07:47 +0000 |
commit | bb8cef51dfe7bb59109786a0ca46ad165c39aa38 (patch) | |
tree | 47107748cff082496775ef833af69b4cc385cc19 /test/ExecutionEngine/MCJIT/fpbitcast.ll | |
parent | 9133783d5483e38b16af6c10df7a8bbe655d3446 (diff) | |
download | llvm-bb8cef51dfe7bb59109786a0ca46ad165c39aa38.tar.gz llvm-bb8cef51dfe7bb59109786a0ca46ad165c39aa38.tar.bz2 llvm-bb8cef51dfe7bb59109786a0ca46ad165c39aa38.tar.xz |
- Added ExecutionEngine/MCJIT tests
- Added HOST_ARCH to Makefile.config.in
The HOST_ARCH will be used by MCJIT tests filter, because MCJIT supported only x86 and ARM architectures now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine/MCJIT/fpbitcast.ll')
-rw-r--r-- | test/ExecutionEngine/MCJIT/fpbitcast.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/ExecutionEngine/MCJIT/fpbitcast.ll b/test/ExecutionEngine/MCJIT/fpbitcast.ll new file mode 100644 index 0000000000..9da908f8cf --- /dev/null +++ b/test/ExecutionEngine/MCJIT/fpbitcast.ll @@ -0,0 +1,20 @@ +; RUN: %lli -use-mcjit -force-interpreter=true %s | grep 40091eb8 +; +define i32 @test(double %x) { +entry: + %x46.i = bitcast double %x to i64 + %tmp343.i = lshr i64 %x46.i, 32 + %tmp344.i = trunc i64 %tmp343.i to i32 + ret i32 %tmp344.i +} + +define i32 @main() +{ + %res = call i32 @test(double 3.14) + %ptr = getelementptr [4 x i8]* @format, i32 0, i32 0 + call i32 (i8*,...)* @printf(i8* %ptr, i32 %res) + ret i32 0 +} + +declare i32 @printf(i8*, ...) +@format = internal constant [4 x i8] c"%x\0A\00" |