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