Chris Lattner | a4c096d | 2002-12-15 07:55:43 +0000 | [diff] [blame] | 1 | |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 2 | int %foo() { |
| 3 | ret int 0 |
| 4 | } |
| 5 | |
Chris Lattner | a4c096d | 2002-12-15 07:55:43 +0000 | [diff] [blame] | 6 | int %main() { |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 7 | ; cast bool to ... |
| 8 | cast bool true to bool |
Chris Lattner | a4c096d | 2002-12-15 07:55:43 +0000 | [diff] [blame] | 9 | cast bool true to int |
Chris Lattner | 20c1b4d | 2003-01-16 19:43:11 +0000 | [diff] [blame] | 10 | cast bool true to long |
| 11 | cast bool true to ulong |
| 12 | cast bool true to float |
| 13 | cast bool true to double |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 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 | |
Chris Lattner | 4f91285 | 2003-05-12 20:35:29 +0000 | [diff] [blame^] | 22 | ; cast ubyte to ... |
| 23 | cast ubyte 0 to float |
| 24 | cast ubyte 0 to double |
| 25 | |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 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 | |
Chris Lattner | 4f91285 | 2003-05-12 20:35:29 +0000 | [diff] [blame^] | 32 | ; cast ushort to ... |
| 33 | ;cast ushort 0 to float |
| 34 | ;cast ushort 0 to double |
| 35 | |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 36 | ; cast int to ... |
Chris Lattner | a4c096d | 2002-12-15 07:55:43 +0000 | [diff] [blame] | 37 | cast int 6 to bool |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 38 | cast int 6 to short |
| 39 | cast int 0 to int |
| 40 | cast int 0 to long |
| 41 | cast int 0 to ulong |
Chris Lattner | 4f91285 | 2003-05-12 20:35:29 +0000 | [diff] [blame^] | 42 | cast int 0 to float |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 43 | cast int 0 to double |
| 44 | |
| 45 | ; cast uint to ... |
| 46 | cast uint 0 to long |
| 47 | cast uint 0 to ulong |
Chris Lattner | 4f91285 | 2003-05-12 20:35:29 +0000 | [diff] [blame^] | 48 | ;cast uint 0 to float |
| 49 | ;cast uint 0 to double |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 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 ... |
Chris Lattner | 20c1b4d | 2003-01-16 19:43:11 +0000 | [diff] [blame] | 64 | ;cast float 0.0 to bool |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 65 | cast float 0.0 to float |
| 66 | cast float 0.0 to double |
| 67 | |
| 68 | ; cast double to ... |
Chris Lattner | 20c1b4d | 2003-01-16 19:43:11 +0000 | [diff] [blame] | 69 | ;cast double 0.0 to bool |
Chris Lattner | 102f533 | 2003-01-13 00:56:37 +0000 | [diff] [blame] | 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 |
Chris Lattner | a4c096d | 2002-12-15 07:55:43 +0000 | [diff] [blame] | 80 | |
| 81 | ret int 0 |
| 82 | } |