Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: test/NaCl/Bitcode/dump.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/NaCl/Bitcode/cmp.ll ('k') | test/NaCl/Bitcode/fast.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Simple tests on dump flags for pnacl-bcanalyzer.
2
3 @bytes = internal global [4 x i8] c"abcd"
4
5 @ptr_to_ptr = internal global i32 ptrtoint (i32* @ptr to i32)
6
7 @ptr = internal global i32 ptrtoint ([4 x i8]* @bytes to i32)
8
9 declare i32 @bar(i32)
10
11 define void @AllocCastSimple() {
12 %1 = alloca i8, i32 4, align 8
13 %2 = ptrtoint i8* %1 to i32
14 %3 = bitcast [4 x i8]* @bytes to i32*
15 store i32 %2, i32* %3, align 1
16 ret void
17 }
18
19 define void @PhiBackwardRefs(i1) {
20 %2 = alloca i8, i32 4, align 8
21 %3 = alloca i8, i32 4, align 8
22 br i1 %0, label %true, label %false
23
24 true: ; preds = %1
25 %4 = bitcast i8* %2 to i32*
26 %5 = load i32* %4
27 %6 = ptrtoint i8* %3 to i32
28 br label %merge
29
30 false: ; preds = %1
31 %7 = bitcast i8* %2 to i32*
32 %8 = load i32* %7
33 %9 = ptrtoint i8* %3 to i32
34 br label %merge
35
36 merge: ; preds = %false, %true
37 %10 = phi i32 [ %6, %true ], [ %9, %false ]
38 %11 = phi i32 [ %5, %true ], [ %8, %false ]
39 ret void
40 }
41
42 ; -------------------------------------------------
43
44 ; 1) Test dump of records.
45 ; RUN: llvm-as < %s | pnacl-freeze \
46 ; RUN: | pnacl-bcanalyzer --operands-per-line=4 \
47 ; RUN: -dump-records \
48 ; RUN: | FileCheck %s -check-prefix=DR
49
50 ; DR: <MODULE_BLOCK>
51 ; DR: <VERSION op0=1/>
52 ; DR: <BLOCKINFO_BLOCK/>
53 ; DR: <TYPE_BLOCK_ID>
54 ; DR: <NUMENTRY op0=7/>
55 ; DR: <INTEGER op0=32/>
56 ; DR: <VOID/>
57 ; DR: <INTEGER op0=1/>
58 ; DR: <INTEGER op0=8/>
59 ; DR: <FUNCTION op0=0 op1=0 op2=0/>
60 ; DR: <FUNCTION op0=0 op1=1/>
61 ; DR: <FUNCTION op0=0 op1=1 op2=2/>
62 ; DR: </TYPE_BLOCK_ID>
63 ; DR: <FUNCTION op0=4 op1=0 op2=1 op3=0/>
64 ; DR: <FUNCTION op0=5 op1=0 op2=0 op3=0/>
65 ; DR: <FUNCTION op0=6 op1=0 op2=0 op3=0/>
66 ; DR: <GLOBALVAR_BLOCK>
67 ; DR: <COUNT op0=3/>
68 ; DR: <VAR op0=0 op1=0/>
69 ; DR: <DATA op0=97 op1=98 op2=99 op3=100/>
70 ; DR: <VAR op0=0 op1=0/>
71 ; DR: <RELOC op0=5/>
72 ; DR: <VAR op0=0 op1=0/>
73 ; DR: <RELOC op0=3/>
74 ; DR: </GLOBALVAR_BLOCK>
75 ; DR: <VALUE_SYMTAB>
76 ; DR: <ENTRY op0=1 op1=65 op2=108 op3=108
77 ; DR: op4=111 op5=99 op6=67 op7=97
78 ; DR: op8=115 op9=116 op10=83 op11=105
79 ; DR: op12=109 op13=112 op14=108 op15=101/>
80 ; DR: <ENTRY op0=2 op1=80 op2=104 op3=105
81 ; DR: op4=66 op5=97 op6=99 op7=107
82 ; DR: op8=119 op9=97 op10=114 op11=100
83 ; DR: op12=82 op13=101 op14=102 op15=115/>
84 ; DR: <ENTRY op0=0 op1=98 op2=97 op3=114/>
85 ; DR: <ENTRY op0=5 op1=112 op2=116 op3=114/>
86 ; DR: <ENTRY op0=3 op1=98 op2=121 op3=116
87 ; DR: op4=101 op5=115/>
88 ; DR: <ENTRY op0=4 op1=112 op2=116 op3=114
89 ; DR: op4=95 op5=116 op6=111 op7=95
90 ; DR: op8=112 op9=116 op10=114/>
91 ; DR: </VALUE_SYMTAB>
92 ; DR: <FUNCTION_BLOCK>
93 ; DR: <DECLAREBLOCKS op0=1/>
94 ; DR: <CONSTANTS_BLOCK>
95 ; DR: <SETTYPE op0=0/>
96 ; DR: <INTEGER op0=8/>
97 ; DR: </CONSTANTS_BLOCK>
98 ; DR: <INST_ALLOCA op0=1 op1=4/>
99 ; DR: <INST_STORE op0=5 op1=1 op2=1/>
100 ; DR: <INST_RET/>
101 ; DR: </FUNCTION_BLOCK>
102 ; DR: <FUNCTION_BLOCK>
103 ; DR: <DECLAREBLOCKS op0=4/>
104 ; DR: <CONSTANTS_BLOCK>
105 ; DR: <SETTYPE op0=0/>
106 ; DR: <INTEGER op0=8/>
107 ; DR: </CONSTANTS_BLOCK>
108 ; DR: <INST_ALLOCA op0=1 op1=4/>
109 ; DR: <INST_ALLOCA op0=2 op1=4/>
110 ; DR: <INST_BR op0=1 op1=2 op2=4/>
111 ; DR: <INST_LOAD op0=2 op1=0 op2=0/>
112 ; DR: <INST_BR op0=3/>
113 ; DR: <INST_LOAD op0=3 op1=0 op2=0/>
114 ; DR: <INST_BR op0=3/>
115 ; DR: <INST_PHI op0=0 op1=6 op2=1 op3=6
116 ; DR: op4=2/>
117 ; DR: <INST_PHI op0=0 op1=6 op2=1 op3=4
118 ; DR: op4=2/>
119 ; DR: <INST_RET/>
120 ; DR: </FUNCTION_BLOCK>
121 ; DR: </MODULE_BLOCK>
122
123 ; -------------------------------------------------
124
125 ; 2) Test dump of records with details.
126 ; RUN: llvm-as < %s | pnacl-freeze \
127 ; RUN: | pnacl-bcanalyzer --operands-per-line=4 \
128 ; RUN: --dump-records --dump-details \
129 ; RUN: | FileCheck %s -check-prefix=DRWD
130
131 ; DRWD: <MODULE_BLOCK abbrev='ENTER_SUBBLOCK' NumWords={{.*}} BlockCodeSize=2>
132 ; DRWD: <VERSION abbrev='UNABBREVIATED' op0=1/>
133 ; DRWD: <BLOCKINFO_BLOCK abbrev='ENTER_SUBBLOCK' NumWords=24 BlockCodeSize=2>
134 ; DRWD: <SETBID abbrev='UNABBREVIATED' block='VALUE_SYMTAB'/>
135 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Fixed(3)' op1='VBR(8)' op 2='Array'
136 ; DRWD: op3='Fixed(8)'/>
137 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(1)' op1='VBR(8)' op2='Array'
138 ; DRWD: op3='Fixed(7)'/>
139 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(1)' op1='VBR(8)' op2='Array'
140 ; DRWD: op3='Char6'/>
141 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(2)' op1='VBR(8)' op2='Array'
142 ; DRWD: op3='Char6'/>
143 ; DRWD: <SETBID abbrev='UNABBREVIATED' block='CONSTANTS_BLOCK'/>
144 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(1)' op1='Fixed(3) '/>
145 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(4)' op1='VBR(8)'/ >
146 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(4)' op1='Literal( 0)'/>
147 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(6)' op1='VBR(8)'/ >
148 ; DRWD: <SETBID abbrev='UNABBREVIATED' block='FUNCTION_BLOCK'/>
149 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(20)' op1='VBR(6)' op2='VBR(4)'
150 ; DRWD: op3='VBR(4)'/>
151 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(2)' op1='VBR(6)' op2='VBR(6)'
152 ; DRWD: op3='Fixed(4)'/>
153 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(3)' op1='VBR(6)' op2='Fixed(3)'
154 ; DRWD: op3='Fixed(4)'/>
155 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(10)'/>
156 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(10)' op1='VBR(6)' />
157 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(15)'/>
158 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(43)' op1='VBR(6)' op2='Fixed(3)'/>
159 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(24)' op1='VBR(6)' op2='VBR(6)'
160 ; DRWD: op3='VBR(4)'/>
161 ; DRWD: <SETBID abbrev='UNABBREVIATED' block='GLOBALVAR_BLOCK'/>
162 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(0)' op1='VBR(6)' op2='Fixed(1)'/>
163 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(1)' op1='VBR(8)'/ >
164 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(2)' op1='VBR(8)'/ >
165 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(3)' op1='Array' o p2='Fixed(8)'/>
166 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(4)' op1='VBR(6)'/ >
167 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(4)' op1='VBR(6)' op2='VBR(6)'/>
168 ; DRWD: </BLOCKINFO_BLOCK abbrev='END_BLOCK'>
169 ; DRWD: <TYPE_BLOCK_ID abbrev='ENTER_SUBBLOCK' NumWords={{.*}} BlockCodeSize=3 >
170 ; DRWD: <DEFINE_ABBREV abbrev='DEFINE_ABBREV' op0='Literal(21)' op1='Fixed(1 )' op2='Array'
171 ; DRWD: op3='Fixed(3)'/>
172 ; DRWD: <NUMENTRY abbrev='UNABBREVIATED' op0=7/>
173 ; DRWD: <INTEGER abbrev='UNABBREVIATED' op0=32/>
174 ; DRWD: <VOID abbrev='UNABBREVIATED'/>
175 ; DRWD: <INTEGER abbrev='UNABBREVIATED' op0=1/>
176 ; DRWD: <INTEGER abbrev='UNABBREVIATED' op0=8/>
177 ; DRWD: <FUNCTION abbrev=4 op0=0 op1=0 op2=0/>
178 ; DRWD: <FUNCTION abbrev=4 op0=0 op1=1/>
179 ; DRWD: <FUNCTION abbrev=4 op0=0 op1=1 op2=2/>
180 ; DRWD: </TYPE_BLOCK_ID abbrev='END_BLOCK'>
181 ; DRWD: <FUNCTION abbrev='UNABBREVIATED' op0=4 op1=0 op2=1
182 ; DRWD: op3=0/>
183 ; DRWD: <FUNCTION abbrev='UNABBREVIATED' op0=5 op1=0 op2=0
184 ; DRWD: op3=0/>
185 ; DRWD: <FUNCTION abbrev='UNABBREVIATED' op0=6 op1=0 op2=0
186 ; DRWD: op3=0/>
187 ; DRWD: <GLOBALVAR_BLOCK abbrev='ENTER_SUBBLOCK' NumWords={{.*}} BlockCodeSize =4>
188 ; DRWD: <COUNT abbrev='UNABBREVIATED' op0=3/>
189 ; DRWD: <VAR abbrev=4 op0=0 op1=0/>
190 ; DRWD: <DATA abbrev=7 op0=97 op1=98 op2=99
191 ; DRWD: op3=100/>
192 ; DRWD: <VAR abbrev=4 op0=0 op1=0/>
193 ; DRWD: <RELOC abbrev=8 op0=5/>
194 ; DRWD: <VAR abbrev=4 op0=0 op1=0/>
195 ; DRWD: <RELOC abbrev=8 op0=3/>
196 ; DRWD: </GLOBALVAR_BLOCK abbrev='END_BLOCK'>
197 ; DRWD: <VALUE_SYMTAB abbrev='ENTER_SUBBLOCK' NumWords={{.*}} BlockCodeSize=3>
198 ; DRWD: <ENTRY abbrev=6 op0=1 op1=65 op2=108
199 ; DRWD: op3=108 op4=111 op5=99 op6=67
200 ; DRWD: op7=97 op8=115 op9=116 op10=83
201 ; DRWD: op11=105 op12=109 op13=112 op14=108
202 ; DRWD: op15=101/>
203 ; DRWD: <ENTRY abbrev=6 op0=2 op1=80 op2=104
204 ; DRWD: op3=105 op4=66 op5=97 op6=99
205 ; DRWD: op7=107 op8=119 op9=97 op10=114
206 ; DRWD: op11=100 op12=82 op13=101 op14=102
207 ; DRWD: op15=115/>
208 ; DRWD: <ENTRY abbrev=6 op0=0 op1=98 op2=97
209 ; DRWD: op3=114/>
210 ; DRWD: <ENTRY abbrev=6 op0=5 op1=112 op2=116
211 ; DRWD: op3=114/>
212 ; DRWD: <ENTRY abbrev=6 op0=3 op1=98 op2=121
213 ; DRWD: op3=116 op4=101 op5=115/>
214 ; DRWD: <ENTRY abbrev=6 op0=4 op1=112 op2=116
215 ; DRWD: op3=114 op4=95 op5=116 op6=111
216 ; DRWD: op7=95 op8=112 op9=116 op10=114/>
217 ; DRWD: </VALUE_SYMTAB abbrev='END_BLOCK'>
218 ; DRWD: <FUNCTION_BLOCK abbrev='ENTER_SUBBLOCK' NumWords={{.*}} BlockCodeSize= 4>
219 ; DRWD: <DECLAREBLOCKS abbrev='UNABBREVIATED' op0=1/>
220 ; DRWD: <CONSTANTS_BLOCK abbrev='ENTER_SUBBLOCK' NumWords={{.*}} BlockCodeSi ze=3>
221 ; DRWD: <SETTYPE abbrev=4 op0=0/>
222 ; DRWD: <INTEGER abbrev=5 op0=8/>
223 ; DRWD: </CONSTANTS_BLOCK abbrev='END_BLOCK'>
224 ; DRWD: <INST_ALLOCA abbrev='UNABBREVIATED' op0=1 op1=4/>
225 ; DRWD: <INST_STORE abbrev=11 op0=5 op1=1 op2=1/>
226 ; DRWD: <INST_RET abbrev=7/>
227 ; DRWD: </FUNCTION_BLOCK abbrev='END_BLOCK'>
228 ; DRWD: <FUNCTION_BLOCK abbrev='ENTER_SUBBLOCK' NumWords={{.*}} BlockCodeSize= 4>
229 ; DRWD: <DECLAREBLOCKS abbrev='UNABBREVIATED' op0=4/>
230 ; DRWD: <CONSTANTS_BLOCK abbrev='ENTER_SUBBLOCK' NumWords={{.*}} BlockCodeSi ze=3>
231 ; DRWD: <SETTYPE abbrev=4 op0=0/>
232 ; DRWD: <INTEGER abbrev=5 op0=8/>
233 ; DRWD: </CONSTANTS_BLOCK abbrev='END_BLOCK'>
234 ; DRWD: <INST_ALLOCA abbrev='UNABBREVIATED' op0=1 op1=4/>
235 ; DRWD: <INST_ALLOCA abbrev='UNABBREVIATED' op0=2 op1=4/>
236 ; DRWD: <INST_BR abbrev='UNABBREVIATED' op0=1 op1=2 op2=4/>
237 ; DRWD: <INST_LOAD abbrev=4 op0=2 op1=0 op2=0/>
238 ; DRWD: <INST_BR abbrev='UNABBREVIATED' op0=3/>
239 ; DRWD: <INST_LOAD abbrev=4 op0=3 op1=0 op2=0/>
240 ; DRWD: <INST_BR abbrev='UNABBREVIATED' op0=3/>
241 ; DRWD: <INST_PHI abbrev='UNABBREVIATED' op0=0 op1=6 op2=1
242 ; DRWD: op3=6 op4=2/>
243 ; DRWD: <INST_PHI abbrev='UNABBREVIATED' op0=0 op1=6 op2=1
244 ; DRWD: op3=4 op4=2/>
245 ; DRWD: <INST_RET abbrev=7/>
246 ; DRWD: </FUNCTION_BLOCK abbrev='END_BLOCK'>
247 ; DRWD: </MODULE_BLOCK abbrev='END_BLOCK'>
OLDNEW
« no previous file with comments | « test/NaCl/Bitcode/cmp.ll ('k') | test/NaCl/Bitcode/fast.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698