X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FExecutionEngine%2Ftest-cast.ll;h=667fa80a48971ead9fccf3a0ccfdeea64104c047;hb=b21d9aebba7e45ddcbce61dd501000049cefb335;hp=21270a361dc7e9d167427f3fcb8e7b27aeac8278;hpb=20c1b4db395cf513230e19f2348e3cb97e9fb7fa;p=oota-llvm.git diff --git a/test/ExecutionEngine/test-cast.ll b/test/ExecutionEngine/test-cast.ll index 21270a361dc..667fa80a489 100644 --- a/test/ExecutionEngine/test-cast.ll +++ b/test/ExecutionEngine/test-cast.ll @@ -1,71 +1,109 @@ +; RUN: %lli %s > /dev/null -int %foo() { - ret int 0 +define i32 @foo() { + ret i32 0 } -int %main() { - ; cast bool to ... - cast bool true to bool - cast bool true to int - 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 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 bool - cast float 0.0 to float - cast float 0.0 to double - - ; cast double to ... - ;cast double 0.0 to bool - 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 +define i32 @main() { + icmp ne i1 true, false ; :1 [#uses=0] + zext i1 true to i8 ; :2 [#uses=0] + zext i1 true to i8 ; :3 [#uses=0] + zext i1 true to i16 ; :4 [#uses=0] + zext i1 true to i16 ; :5 [#uses=0] + zext i1 true to i32 ; :6 [#uses=0] + zext i1 true to i32 ; :7 [#uses=0] + zext i1 true to i64 ; :8 [#uses=0] + zext i1 true to i64 ; :9 [#uses=0] + uitofp i1 true to float ; :10 [#uses=0] + uitofp i1 true to double ; :11 [#uses=0] + icmp ne i8 0, 0 ; :12 [#uses=0] + icmp ne i8 1, 0 ; :13 [#uses=0] + bitcast i8 0 to i8 ; :14 [#uses=0] + bitcast i8 -1 to i8 ; :15 [#uses=0] + sext i8 4 to i16 ; :16 [#uses=0] + sext i8 4 to i16 ; :17 [#uses=0] + sext i8 4 to i64 ; :18 [#uses=0] + sext i8 4 to i64 ; :19 [#uses=0] + sitofp i8 4 to float ; :20 [#uses=0] + sitofp i8 4 to double ; :21 [#uses=0] + icmp ne i8 0, 0 ; :22 [#uses=0] + icmp ne i8 1, 0 ; :23 [#uses=0] + bitcast i8 0 to i8 ; :24 [#uses=0] + bitcast i8 1 to i8 ; :25 [#uses=0] + zext i8 4 to i16 ; :26 [#uses=0] + zext i8 4 to i16 ; :27 [#uses=0] + zext i8 4 to i64 ; :28 [#uses=0] + zext i8 4 to i64 ; :29 [#uses=0] + uitofp i8 0 to float ; :30 [#uses=0] + uitofp i8 0 to double ; :31 [#uses=0] + icmp ne i16 1, 0 ; :32 [#uses=0] + trunc i16 -1 to i8 ; :33 [#uses=0] + trunc i16 255 to i8 ; :34 [#uses=0] + bitcast i16 0 to i16 ; :35 [#uses=0] + bitcast i16 0 to i16 ; :36 [#uses=0] + sext i16 0 to i64 ; :37 [#uses=0] + sext i16 0 to i64 ; :38 [#uses=0] + sitofp i16 0 to float ; :39 [#uses=0] + sitofp i16 0 to double ; :40 [#uses=0] + icmp ne i16 1, 0 ; :41 [#uses=0] + trunc i16 1 to i8 ; :42 [#uses=0] + trunc i16 255 to i8 ; :43 [#uses=0] + bitcast i16 0 to i16 ; :44 [#uses=0] + bitcast i16 0 to i16 ; :45 [#uses=0] + zext i16 0 to i64 ; :46 [#uses=0] + zext i16 0 to i64 ; :47 [#uses=0] + uitofp i16 0 to float ; :48 [#uses=0] + uitofp i16 0 to double ; :49 [#uses=0] + icmp ne i32 6, 0 ; :50 [#uses=0] + trunc i32 -6 to i8 ; :51 [#uses=0] + trunc i32 6 to i8 ; :52 [#uses=0] + trunc i32 6 to i16 ; :53 [#uses=0] + bitcast i32 0 to i32 ; :54 [#uses=0] + sext i32 0 to i64 ; :55 [#uses=0] + sext i32 0 to i64 ; :56 [#uses=0] + sitofp i32 0 to float ; :57 [#uses=0] + sitofp i32 0 to double ; :58 [#uses=0] + icmp ne i32 6, 0 ; :59 [#uses=0] + trunc i32 7 to i8 ; :60 [#uses=0] + trunc i32 8 to i8 ; :61 [#uses=0] + trunc i32 9 to i16 ; :62 [#uses=0] + bitcast i32 10 to i32 ; :63 [#uses=0] + zext i32 0 to i64 ; :64 [#uses=0] + zext i32 0 to i64 ; :65 [#uses=0] + uitofp i32 0 to float ; :66 [#uses=0] + uitofp i32 0 to double ; :67 [#uses=0] + icmp ne i64 0, 0 ; :68 [#uses=0] + trunc i64 0 to i8 ; :69 [#uses=0] + trunc i64 0 to i8 ; :70 [#uses=0] + trunc i64 0 to i16 ; :71 [#uses=0] + trunc i64 0 to i16 ; :72 [#uses=0] + trunc i64 0 to i32 ; :73 [#uses=0] + trunc i64 0 to i32 ; :74 [#uses=0] + bitcast i64 0 to i64 ; :75 [#uses=0] + bitcast i64 0 to i64 ; :76 [#uses=0] + sitofp i64 0 to float ; :77 [#uses=0] + sitofp i64 0 to double ; :78 [#uses=0] + icmp ne i64 1, 0 ; :79 [#uses=0] + trunc i64 1 to i8 ; :80 [#uses=0] + trunc i64 1 to i8 ; :81 [#uses=0] + trunc i64 1 to i16 ; :82 [#uses=0] + trunc i64 1 to i16 ; :83 [#uses=0] + trunc i64 1 to i32 ; :84 [#uses=0] + trunc i64 1 to i32 ; :85 [#uses=0] + bitcast i64 1 to i64 ; :86 [#uses=0] + bitcast i64 1 to i64 ; :87 [#uses=0] + uitofp i64 1 to float ; :88 [#uses=0] + uitofp i64 0 to double ; :89 [#uses=0] + bitcast float 0.000000e+00 to float ; :90 [#uses=0] + fpext float 0.000000e+00 to double ; :91 [#uses=0] + fptosi double 0.000000e+00 to i8 ; :92 [#uses=0] + fptoui double 0.000000e+00 to i8 ; :93 [#uses=0] + fptosi double 0.000000e+00 to i16 ; :94 [#uses=0] + fptoui double 0.000000e+00 to i16 ; :95 [#uses=0] + fptosi double 0.000000e+00 to i32 ; :96 [#uses=0] + fptoui double 0.000000e+00 to i32 ; :97 [#uses=0] + fptosi double 0.000000e+00 to i64 ; :98 [#uses=0] + fptrunc double 0.000000e+00 to float ; :99 [#uses=0] + bitcast double 0.000000e+00 to double ; :100 [#uses=0] + ret i32 0 }