Add tests for casts from unsigned integers to floats
[oota-llvm.git] / test / ExecutionEngine / test-cast.ll
1
2 int %foo() {
3   ret int 0
4 }
5
6 int %main() {
7   ; cast bool to ...
8   cast bool true to bool
9   cast bool true to int
10   cast bool true to long
11   cast bool true to ulong
12   cast bool true to float
13   cast bool true to double
14
15   ; cast sbyte to ...
16   cast sbyte 0 to sbyte
17   cast sbyte 4 to short
18   cast sbyte 4 to long
19   cast sbyte 4 to ulong
20   cast sbyte 4 to double
21
22   ; cast ubyte to ...
23   cast ubyte 0 to float
24   cast ubyte 0 to double
25
26   ; cast short to ...
27   cast short 0 to short
28   cast short 0 to long
29   cast short 0 to ulong
30   cast short 0 to double
31
32   ; cast ushort to ...
33   ;cast ushort 0 to float
34   ;cast ushort 0 to double
35
36   ; cast int to ...
37   cast int 6 to bool
38   cast int 6 to short
39   cast int 0 to int
40   cast int 0 to long
41   cast int 0 to ulong
42   cast int 0 to float
43   cast int 0 to double
44
45   ; cast uint to ...
46   cast uint 0 to long
47   cast uint 0 to ulong
48   ;cast uint 0 to float
49   ;cast uint 0 to double
50
51   ; cast long to ...
52   cast long 0 to sbyte
53   cast long 0 to ubyte
54   cast long 0 to short
55   cast long 0 to ushort
56   cast long 0 to int
57   cast long 0 to uint
58   cast long 0 to long
59   cast long 0 to ulong
60   cast long 0 to float
61   cast long 0 to double
62   
63   ; cast float to ...
64   ;cast float 0.0 to bool
65   cast float 0.0 to float
66   cast float 0.0 to double
67
68   ; cast double to ...
69   ;cast double 0.0 to bool
70   cast double 0.0 to sbyte
71   cast double 0.0 to ubyte
72   cast double 0.0 to short
73   cast double 0.0 to ushort
74   cast double 0.0 to int
75   cast double 0.0 to uint
76   cast double 0.0 to long
77   ;cast double 0.0 to ulong
78   cast double 0.0 to float
79   cast double 0.0 to double
80
81   ret int 0
82 }