1 ; RUN: llvm-dis < %s.bc| FileCheck %s 2 3 ; conversionInstructions.3.2.ll.bc was generated by passing this file to llvm-as-3.2. 4 ; The test checks that LLVM does not misread conversion instructions from 5 ; older bitcode files. 6 7 define void @trunc(i32 %src){ 8 entry: 9 ; CHECK: %res1 = trunc i32 %src to i8 10 %res1 = trunc i32 %src to i8 11 12 ret void 13 } 14 15 define void @zext(i32 %src){ 16 entry: 17 ; CHECK: %res1 = zext i32 %src to i64 18 %res1 = zext i32 %src to i64 19 20 ret void 21 } 22 23 define void @sext(i32 %src){ 24 entry: 25 ; CHECK: %res1 = sext i32 %src to i64 26 %res1 = sext i32 %src to i64 27 28 ret void 29 } 30 31 define void @fptrunc(double %src){ 32 entry: 33 ; CHECK: %res1 = fptrunc double %src to float 34 %res1 = fptrunc double %src to float 35 36 ret void 37 } 38 39 define void @fpext(float %src){ 40 entry: 41 ; CHECK: %res1 = fpext float %src to double 42 %res1 = fpext float %src to double 43 44 ret void 45 } 46 47 define void @fptoui(float %src){ 48 entry: 49 ; CHECK: %res1 = fptoui float %src to i32 50 %res1 = fptoui float %src to i32 51 52 ret void 53 } 54 55 define void @fptosi(float %src){ 56 entry: 57 ; CHECK: %res1 = fptosi float %src to i32 58 %res1 = fptosi float %src to i32 59 60 ret void 61 } 62 63 define void @uitofp(i32 %src){ 64 entry: 65 ; CHECK: %res1 = uitofp i32 %src to float 66 %res1 = uitofp i32 %src to float 67 68 ret void 69 } 70 71 define void @sitofp(i32 %src){ 72 entry: 73 ; CHECK: %res1 = sitofp i32 %src to float 74 %res1 = sitofp i32 %src to float 75 76 ret void 77 } 78 79 define void @ptrtoint(i32* %src){ 80 entry: 81 ; CHECK: %res1 = ptrtoint i32* %src to i8 82 %res1 = ptrtoint i32* %src to i8 83 84 ret void 85 } 86 87 define void @inttoptr(i32 %src){ 88 entry: 89 ; CHECK: %res1 = inttoptr i32 %src to i32* 90 %res1 = inttoptr i32 %src to i32* 91 92 ret void 93 } 94 95 define void @bitcast(i32 %src1, i32* %src2){ 96 entry: 97 ; CHECK: %res1 = bitcast i32 %src1 to i32 98 %res1 = bitcast i32 %src1 to i32 99 100 ; CHECK: %res2 = bitcast i32* %src2 to i64* 101 %res2 = bitcast i32* %src2 to i64* 102 103 ret void 104 } 105 106 define void @ptrtointInstr(i32* %ptr, <4 x i32*> %vecPtr){ 107 entry: 108 ; CHECK: %res1 = ptrtoint i32* %ptr to i8 109 %res1 = ptrtoint i32* %ptr to i8 110 ; CHECK-NEXT: %res2 = ptrtoint <4 x i32*> %vecPtr to <4 x i64> 111 %res2 = ptrtoint <4 x i32*> %vecPtr to <4 x i64> 112 113 ret void 114 } 115 116 define void @inttoptrInstr(i32 %x, <4 x i32> %vec){ 117 entry: 118 ; CHECK: %res1 = inttoptr i32 %x to i64* 119 %res1 = inttoptr i32 %x to i64* 120 ; CHECK-NEXT: inttoptr <4 x i32> %vec to <4 x i8*> 121 %res2 = inttoptr <4 x i32> %vec to <4 x i8*> 122 123 ret void 124 } 125