summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-05-07 21:10:28 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-05-07 21:10:28 +0000
commit2c9a94cd4f83b9a997f2aca86345a4cb203a1efa (patch)
treeab416673a27d6ac3184b0e22e8ea7f88f52c7825 /test
parent260195d2b1a2a3be54d932ccd8da45346bec5676 (diff)
downloadllvm-2c9a94cd4f83b9a997f2aca86345a4cb203a1efa.tar.gz
llvm-2c9a94cd4f83b9a997f2aca86345a4cb203a1efa.tar.bz2
llvm-2c9a94cd4f83b9a997f2aca86345a4cb203a1efa.tar.xz
Add more casts. You can never have enough casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/ExecutionEngine/test-cast.ll50
1 files changed, 49 insertions, 1 deletions
diff --git a/test/ExecutionEngine/test-cast.ll b/test/ExecutionEngine/test-cast.ll
index 753c9fa708..933d1e8a52 100644
--- a/test/ExecutionEngine/test-cast.ll
+++ b/test/ExecutionEngine/test-cast.ll
@@ -7,35 +7,67 @@ int %foo() {
int %main() {
; cast bool to ...
cast bool true to bool
+ cast bool true to ubyte
+ cast bool true to sbyte
+ cast bool true to short
+ cast bool true to ushort
cast bool true to int
+ cast bool true to uint
cast bool true to long
cast bool true to ulong
cast bool true to float
cast bool true to double
; cast sbyte to ...
+ cast sbyte 0 to bool
+ cast sbyte 1 to bool
cast sbyte 0 to sbyte
+ cast sbyte -1 to ubyte
cast sbyte 4 to short
+ cast sbyte 4 to ushort
cast sbyte 4 to long
cast sbyte 4 to ulong
+ cast sbyte 4 to float
cast sbyte 4 to double
; cast ubyte to ...
+ cast ubyte 0 to bool
+ cast ubyte 1 to bool
+ cast ubyte 0 to sbyte
+ cast ubyte 1 to ubyte
+ cast ubyte 4 to short
+ cast ubyte 4 to ushort
+ cast ubyte 4 to long
+ cast ubyte 4 to ulong
cast ubyte 0 to float
cast ubyte 0 to double
; cast short to ...
+ cast short 1 to bool
+ cast short -1 to sbyte
+ cast short 255 to ubyte
cast short 0 to short
+ cast short 0 to ushort
cast short 0 to long
cast short 0 to ulong
+ cast short 0 to float
cast short 0 to double
; cast ushort to ...
+ cast ushort 1 to bool
+ cast ushort 1 to sbyte
+ cast ushort 255 to ubyte
+ cast ushort 0 to short
+ cast ushort 0 to ushort
+ cast ushort 0 to long
+ cast ushort 0 to ulong
cast ushort 0 to float
cast ushort 0 to double
; cast int to ...
cast int 6 to bool
+ cast int -6 to sbyte
+ cast int 6 to ubyte
cast int 6 to short
cast int 0 to int
cast int 0 to long
@@ -44,6 +76,11 @@ int %main() {
cast int 0 to double
; cast uint to ...
+ cast uint 6 to bool
+ cast uint 7 to sbyte
+ cast uint 8 to ubyte
+ cast uint 9 to short
+ cast uint 10 to int
cast uint 0 to long
cast uint 0 to ulong
cast uint 0 to float
@@ -62,7 +99,18 @@ int %main() {
cast long 0 to float
cast long 0 to double
- cast ulong 0 to bool
+ ; cast ulong to ...
+ cast ulong 1 to bool
+ cast ulong 1 to sbyte
+ cast ulong 1 to ubyte
+ cast ulong 1 to short
+ cast ulong 1 to ushort
+ cast ulong 1 to int
+ cast ulong 1 to uint
+ cast ulong 1 to long
+ cast ulong 1 to ulong
+ cast ulong 1 to float
+ cast ulong 0 to double
; cast float to ...
;cast float 0.0 to bool