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 7define void @trunc(i32 %src){ 8entry: 9; CHECK: %res1 = trunc i32 %src to i8 10 %res1 = trunc i32 %src to i8 11 12 ret void 13} 14 15define void @zext(i32 %src){ 16entry: 17; CHECK: %res1 = zext i32 %src to i64 18 %res1 = zext i32 %src to i64 19 20 ret void 21} 22 23define void @sext(i32 %src){ 24entry: 25; CHECK: %res1 = sext i32 %src to i64 26 %res1 = sext i32 %src to i64 27 28 ret void 29} 30 31define void @fptrunc(double %src){ 32entry: 33; CHECK: %res1 = fptrunc double %src to float 34 %res1 = fptrunc double %src to float 35 36 ret void 37} 38 39define void @fpext(float %src){ 40entry: 41; CHECK: %res1 = fpext float %src to double 42 %res1 = fpext float %src to double 43 44 ret void 45} 46 47define void @fptoui(float %src){ 48entry: 49; CHECK: %res1 = fptoui float %src to i32 50 %res1 = fptoui float %src to i32 51 52 ret void 53} 54 55define void @fptosi(float %src){ 56entry: 57; CHECK: %res1 = fptosi float %src to i32 58 %res1 = fptosi float %src to i32 59 60 ret void 61} 62 63define void @uitofp(i32 %src){ 64entry: 65; CHECK: %res1 = uitofp i32 %src to float 66 %res1 = uitofp i32 %src to float 67 68 ret void 69} 70 71define void @sitofp(i32 %src){ 72entry: 73; CHECK: %res1 = sitofp i32 %src to float 74 %res1 = sitofp i32 %src to float 75 76 ret void 77} 78 79define void @ptrtoint(i32* %src){ 80entry: 81; CHECK: %res1 = ptrtoint i32* %src to i8 82 %res1 = ptrtoint i32* %src to i8 83 84 ret void 85} 86 87define void @inttoptr(i32 %src){ 88entry: 89; CHECK: %res1 = inttoptr i32 %src to i32* 90 %res1 = inttoptr i32 %src to i32* 91 92 ret void 93} 94 95define void @bitcast(i32 %src1, i32* %src2){ 96entry: 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 106define void @ptrtointInstr(i32* %ptr, <4 x i32*> %vecPtr){ 107entry: 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 116define void @inttoptrInstr(i32 %x, <4 x i32> %vec){ 117entry: 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