aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-01-13 00:56:37 +0000
committerChris Lattner <sabre@nondot.org>2003-01-13 00:56:37 +0000
commit102f533f69caca0950f406ffb4254dbfe76e5a31 (patch)
tree33cf7b44ce1d7acf5b8b290ad54df0747fa14c74
parent376b12707aad213304a872507a6fb6d9e687a181 (diff)
test a bunch of stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5244 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/ExecutionEngine/test-cast.ll58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/ExecutionEngine/test-cast.ll b/test/ExecutionEngine/test-cast.ll
index 4ae8a4df16..a0d6403a1b 100644
--- a/test/ExecutionEngine/test-cast.ll
+++ b/test/ExecutionEngine/test-cast.ll
@@ -1,7 +1,65 @@
+int %foo() {
+ ret int 0
+}
+
int %main() {
+ ; cast bool to ...
+ cast bool true to bool
cast bool true to int
+
+ ; cast sbyte to ...
+ cast sbyte 0 to sbyte
+ cast sbyte 4 to short
+ cast sbyte 4 to long
+ cast sbyte 4 to ulong
+ cast sbyte 4 to double
+
+ ; cast short to ...
+ cast short 0 to short
+ cast short 0 to long
+ cast short 0 to ulong
+ cast short 0 to double
+
+ ; cast int to ...
cast int 6 to bool
+ cast int 6 to short
+ cast int 0 to int
+ cast int 0 to long
+ cast int 0 to ulong
+ cast int 0 to double
+
+ ; cast uint to ...
+ cast uint 0 to long
+ cast uint 0 to ulong
+
+ ; cast long to ...
+ cast long 0 to sbyte
+ cast long 0 to ubyte
+ cast long 0 to short
+ cast long 0 to ushort
+ cast long 0 to int
+ cast long 0 to uint
+ cast long 0 to long
+ cast long 0 to ulong
+ cast long 0 to float
+ cast long 0 to double
+
+ ; cast float to ...
+ cast float 0.0 to float
+ cast float 0.0 to double
+
+ ; cast double to ...
+ cast double 0.0 to sbyte
+ cast double 0.0 to ubyte
+ cast double 0.0 to short
+ cast double 0.0 to ushort
+ cast double 0.0 to int
+ cast double 0.0 to uint
+ cast double 0.0 to long
+ ;cast double 0.0 to ulong
+ cast double 0.0 to float
+ cast double 0.0 to double
ret int 0
}