1 ; RUN: llvm-dis < %s.bc| FileCheck %s
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
7 define void @trunc(i32 %src){
9 ; CHECK: %res1 = trunc i32 %src to i8
10 %res1 = trunc i32 %src to i8
15 define void @zext(i32 %src){
17 ; CHECK: %res1 = zext i32 %src to i64
18 %res1 = zext i32 %src to i64
23 define void @sext(i32 %src){
25 ; CHECK: %res1 = sext i32 %src to i64
26 %res1 = sext i32 %src to i64
31 define void @fptrunc(double %src){
33 ; CHECK: %res1 = fptrunc double %src to float
34 %res1 = fptrunc double %src to float
39 define void @fpext(float %src){
41 ; CHECK: %res1 = fpext float %src to double
42 %res1 = fpext float %src to double
47 define void @fptoui(float %src){
49 ; CHECK: %res1 = fptoui float %src to i32
50 %res1 = fptoui float %src to i32
55 define void @fptosi(float %src){
57 ; CHECK: %res1 = fptosi float %src to i32
58 %res1 = fptosi float %src to i32
63 define void @uitofp(i32 %src){
65 ; CHECK: %res1 = uitofp i32 %src to float
66 %res1 = uitofp i32 %src to float
71 define void @sitofp(i32 %src){
73 ; CHECK: %res1 = sitofp i32 %src to float
74 %res1 = sitofp i32 %src to float
79 define void @ptrtoint(i32* %src){
81 ; CHECK: %res1 = ptrtoint i32* %src to i8
82 %res1 = ptrtoint i32* %src to i8
87 define void @inttoptr(i32 %src){
89 ; CHECK: %res1 = inttoptr i32 %src to i32*
90 %res1 = inttoptr i32 %src to i32*
95 define void @bitcast(i32 %src1, i32* %src2){
97 ; CHECK: %res1 = bitcast i32 %src1 to i32
98 %res1 = bitcast i32 %src1 to i32
100 ; CHECK: %res2 = bitcast i32* %src2 to i64*
101 %res2 = bitcast i32* %src2 to i64*
106 define void @ptrtointInstr(i32* %ptr, <4 x i32*> %vecPtr){
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>
116 define void @inttoptrInstr(i32 %x, <4 x i32> %vec){
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*>