19201fb9cSMichael Kuperstein; RUN:  llvm-dis < %s.bc| FileCheck %s
29201fb9cSMichael Kuperstein
3*946b3b2eSMichael Kuperstein; conversionInstructions.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
49201fb9cSMichael Kuperstein; The test checks that LLVM does not misread conversion instructions from
59201fb9cSMichael Kuperstein; older bitcode files.
69201fb9cSMichael Kuperstein
79201fb9cSMichael Kupersteindefine void @trunc(i32 %src){
89201fb9cSMichael Kupersteinentry:
99201fb9cSMichael Kuperstein; CHECK: %res1 = trunc i32 %src to i8
109201fb9cSMichael Kuperstein  %res1 = trunc i32 %src to i8
119201fb9cSMichael Kuperstein
129201fb9cSMichael Kuperstein  ret void
139201fb9cSMichael Kuperstein}
149201fb9cSMichael Kuperstein
159201fb9cSMichael Kupersteindefine void @zext(i32 %src){
169201fb9cSMichael Kupersteinentry:
179201fb9cSMichael Kuperstein; CHECK: %res1 = zext i32 %src to i64
189201fb9cSMichael Kuperstein  %res1 = zext i32 %src to i64
199201fb9cSMichael Kuperstein
209201fb9cSMichael Kuperstein  ret void
219201fb9cSMichael Kuperstein}
229201fb9cSMichael Kuperstein
239201fb9cSMichael Kupersteindefine void @sext(i32 %src){
249201fb9cSMichael Kupersteinentry:
259201fb9cSMichael Kuperstein; CHECK: %res1 = sext i32 %src to i64
269201fb9cSMichael Kuperstein  %res1 = sext i32 %src to i64
279201fb9cSMichael Kuperstein
289201fb9cSMichael Kuperstein  ret void
299201fb9cSMichael Kuperstein}
309201fb9cSMichael Kuperstein
319201fb9cSMichael Kupersteindefine void @fptrunc(double %src){
329201fb9cSMichael Kupersteinentry:
339201fb9cSMichael Kuperstein; CHECK: %res1 = fptrunc double %src to float
349201fb9cSMichael Kuperstein  %res1 = fptrunc double %src to float
359201fb9cSMichael Kuperstein
369201fb9cSMichael Kuperstein  ret void
379201fb9cSMichael Kuperstein}
389201fb9cSMichael Kuperstein
399201fb9cSMichael Kupersteindefine void @fpext(float %src){
409201fb9cSMichael Kupersteinentry:
419201fb9cSMichael Kuperstein; CHECK: %res1 = fpext float %src to double
429201fb9cSMichael Kuperstein  %res1 = fpext float %src to double
439201fb9cSMichael Kuperstein
449201fb9cSMichael Kuperstein  ret void
459201fb9cSMichael Kuperstein}
469201fb9cSMichael Kuperstein
479201fb9cSMichael Kupersteindefine void @fptoui(float %src){
489201fb9cSMichael Kupersteinentry:
499201fb9cSMichael Kuperstein; CHECK: %res1 = fptoui float %src to i32
509201fb9cSMichael Kuperstein  %res1 = fptoui float %src to i32
519201fb9cSMichael Kuperstein
529201fb9cSMichael Kuperstein  ret void
539201fb9cSMichael Kuperstein}
549201fb9cSMichael Kuperstein
559201fb9cSMichael Kupersteindefine void @fptosi(float %src){
569201fb9cSMichael Kupersteinentry:
579201fb9cSMichael Kuperstein; CHECK: %res1 = fptosi float %src to i32
589201fb9cSMichael Kuperstein  %res1 = fptosi float %src to i32
599201fb9cSMichael Kuperstein
609201fb9cSMichael Kuperstein  ret void
619201fb9cSMichael Kuperstein}
629201fb9cSMichael Kuperstein
639201fb9cSMichael Kupersteindefine void @uitofp(i32 %src){
649201fb9cSMichael Kupersteinentry:
659201fb9cSMichael Kuperstein; CHECK: %res1 = uitofp i32 %src to float
669201fb9cSMichael Kuperstein  %res1 = uitofp i32 %src to float
679201fb9cSMichael Kuperstein
689201fb9cSMichael Kuperstein  ret void
699201fb9cSMichael Kuperstein}
709201fb9cSMichael Kuperstein
719201fb9cSMichael Kupersteindefine void @sitofp(i32 %src){
729201fb9cSMichael Kupersteinentry:
739201fb9cSMichael Kuperstein; CHECK: %res1 = sitofp i32 %src to float
749201fb9cSMichael Kuperstein  %res1 = sitofp i32 %src to float
759201fb9cSMichael Kuperstein
769201fb9cSMichael Kuperstein  ret void
779201fb9cSMichael Kuperstein}
789201fb9cSMichael Kuperstein
799201fb9cSMichael Kupersteindefine void @ptrtoint(i32* %src){
809201fb9cSMichael Kupersteinentry:
819201fb9cSMichael Kuperstein; CHECK: %res1 = ptrtoint i32* %src to i8
829201fb9cSMichael Kuperstein  %res1 = ptrtoint i32* %src to i8
839201fb9cSMichael Kuperstein
849201fb9cSMichael Kuperstein  ret void
859201fb9cSMichael Kuperstein}
869201fb9cSMichael Kuperstein
879201fb9cSMichael Kupersteindefine void @inttoptr(i32 %src){
889201fb9cSMichael Kupersteinentry:
899201fb9cSMichael Kuperstein; CHECK: %res1 = inttoptr i32 %src to i32*
909201fb9cSMichael Kuperstein  %res1 = inttoptr i32 %src to i32*
919201fb9cSMichael Kuperstein
929201fb9cSMichael Kuperstein  ret void
939201fb9cSMichael Kuperstein}
949201fb9cSMichael Kuperstein
959201fb9cSMichael Kupersteindefine void @bitcast(i32 %src1, i32* %src2){
969201fb9cSMichael Kupersteinentry:
979201fb9cSMichael Kuperstein; CHECK: %res1 = bitcast i32 %src1 to i32
989201fb9cSMichael Kuperstein  %res1 = bitcast i32 %src1 to i32
999201fb9cSMichael Kuperstein
1009201fb9cSMichael Kuperstein; CHECK: %res2 = bitcast i32* %src2 to i64*
1019201fb9cSMichael Kuperstein  %res2 = bitcast i32* %src2 to i64*
1029201fb9cSMichael Kuperstein
1039201fb9cSMichael Kuperstein  ret void
1049201fb9cSMichael Kuperstein}
105*946b3b2eSMichael Kuperstein
106*946b3b2eSMichael Kupersteindefine void @ptrtointInstr(i32* %ptr, <4 x i32*> %vecPtr){
107*946b3b2eSMichael Kupersteinentry:
108*946b3b2eSMichael Kuperstein; CHECK: %res1 = ptrtoint i32* %ptr to i8
109*946b3b2eSMichael Kuperstein  %res1 = ptrtoint i32* %ptr to i8
110*946b3b2eSMichael Kuperstein; CHECK-NEXT: %res2 = ptrtoint <4 x i32*> %vecPtr to <4 x i64>
111*946b3b2eSMichael Kuperstein  %res2 = ptrtoint <4 x i32*> %vecPtr to <4 x i64>
112*946b3b2eSMichael Kuperstein
113*946b3b2eSMichael Kuperstein  ret void
114*946b3b2eSMichael Kuperstein}
115*946b3b2eSMichael Kuperstein
116*946b3b2eSMichael Kupersteindefine void @inttoptrInstr(i32 %x, <4 x i32> %vec){
117*946b3b2eSMichael Kupersteinentry:
118*946b3b2eSMichael Kuperstein; CHECK: %res1 = inttoptr i32 %x to i64*
119*946b3b2eSMichael Kuperstein  %res1 = inttoptr i32 %x to i64*
120*946b3b2eSMichael Kuperstein; CHECK-NEXT: inttoptr <4 x i32> %vec to <4 x i8*>
121*946b3b2eSMichael Kuperstein  %res2 = inttoptr <4 x i32> %vec to <4 x i8*>
122*946b3b2eSMichael Kuperstein
123*946b3b2eSMichael Kuperstein  ret void
124*946b3b2eSMichael Kuperstein}
125