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

Side by Side Diff: test/NaCl/Bitcode/pnacl-bcdis/no-abbreviations.ll

Issue 1122423005: Add (unsupported experimental) feature allowing byte aligned bitcode. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix nits. Created 5 years, 7 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
OLDNEW
1 ; Simple test to show the difference between no abbreviations, and 1 ; Simple test to show the difference between no abbreviations, and
2 ; the ones provided by pnacl-freeze. Differences are show by the 2 ; the ones provided by pnacl-freeze. Differences are show by the
3 ; addresses for records. 3 ; addresses for records.
4 4
5 ; RUN: llvm-as < %s | pnacl-freeze --allow-local-symbol-tables \ 5 ; RUN: llvm-as < %s | pnacl-freeze --allow-local-symbol-tables \
6 ; RUN: | pnacl-bcdis --allow-local-symbol-tables \ 6 ; RUN: | pnacl-bcdis --allow-local-symbol-tables \
7 ; RUN: | FileCheck %s --check-prefix ABV 7 ; RUN: | FileCheck %s --check-prefix ABV
8 8
9 ; RUN: llvm-as < %s | pnacl-freeze --allow-local-symbol-tables \ 9 ; RUN: llvm-as < %s | pnacl-freeze --allow-local-symbol-tables \
10 ; RUN: --align-bitcode-records \
11 ; RUN: | pnacl-bcdis --allow-local-symbol-tables \
12 ; RUN: | FileCheck %s --check-prefix ALN
13
14 ; RUN: llvm-as < %s | pnacl-freeze --allow-local-symbol-tables \
10 ; RUN: | pnacl-bccompress --remove-abbreviations \ 15 ; RUN: | pnacl-bccompress --remove-abbreviations \
11 ; RUN: | pnacl-bcdis --allow-local-symbol-tables \ 16 ; RUN: | pnacl-bcdis --allow-local-symbol-tables \
12 ; RUN: | FileCheck %s --check-prefix NOABV 17 ; RUN: | FileCheck %s --check-prefix NOABV
13 18
14 define i32 @fact(i32 %n) { 19 define i32 @fact(i32 %n) {
15 %v1 = icmp eq i32 0, 1 20 %v1 = icmp eq i32 0, 1
16 br i1 %v1, label %true, label %false 21 br i1 %v1, label %true, label %false
17 true: 22 true:
18 ret i32 1 23 ret i32 1
19 false: 24 false:
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 ; ABV-NEXT: 252:6| 6: <1, 5, 118, 50> | %v1 : "v2"; <@a2> 124 ; ABV-NEXT: 252:6| 6: <1, 5, 118, 50> | %v1 : "v2"; <@a2>
120 ; ABV-NEXT: 256:3| 6: <1, 6, 118, 51> | %v2 : "v3"; <@a2> 125 ; ABV-NEXT: 256:3| 6: <1, 6, 118, 51> | %v2 : "v3"; <@a2>
121 ; ABV-NEXT: 260:0| 6: <1, 7, 118, 52> | %v3 : "v4"; <@a2> 126 ; ABV-NEXT: 260:0| 6: <1, 7, 118, 52> | %v3 : "v4"; <@a2>
122 ; ABV-NEXT: 263:5| 7: <2, 2, 102, 97, 108,| %b2 : "false"; <@a3> 127 ; ABV-NEXT: 263:5| 7: <2, 2, 102, 97, 108,| %b2 : "false"; <@a3>
123 ; ABV-NEXT: | 115, 101> | 128 ; ABV-NEXT: | 115, 101> |
124 ; ABV-NEXT: 269:4| 6: <1, 1, 110> | %p0 : "n"; <@a2> 129 ; ABV-NEXT: 269:4| 6: <1, 1, 110> | %p0 : "n"; <@a2>
125 ; ABV-NEXT: 272:3| 0: <65534> | } 130 ; ABV-NEXT: 272:3| 0: <65534> | }
126 ; ABV-NEXT: 276:0| 0: <65534> | } 131 ; ABV-NEXT: 276:0| 0: <65534> | }
127 ; ABV-NEXT: 280:0|0: <65534> |} 132 ; ABV-NEXT: 280:0|0: <65534> |}
128 133
134 ; ALN: 0:0|<65532, 80, 69, 88, 69, 2, 0,|Magic Number: 'PEXE' (80, 69 , 88, 69)
135 ; ALN-NEXT: | 12, 0, 17, 0, 4, 0, 2, 0, 0,|PNaCl Version: 2
136 ; ALN-NEXT: | 0, 34, 0, 0, 0> |Align bitcode records: true
137 ; ALN-NEXT:Warning(0:0): Unsupported: Align bitcode records: true
138 ; ALN-NEXT: 20:0|1: <65535, 8, 2> |module { // BlockID = 8
139 ; ALN-NEXT: 28:0| 3: <1, 1> | version 1;
140 ; ALN-NEXT: 31:0| 1: <65535, 0, 2> | abbreviations { // BlockI D = 0
141 ; ALN-NEXT: 40:0| 3: <1, 14> | valuesymtab:
142 ; ALN-NEXT: 43:0| 2: <65533, 4, 0, 1, 3, 0,| @a0 = abbrev <fixed(3) , vbr(8),
143 ; ALN-NEXT: | 2, 8, 0, 3, 0, 1, 8> | array(fix ed(8))>;
144 ; ALN-NEXT: 48:0| 2: <65533, 4, 1, 1, 0, 2,| @a1 = abbrev <1, vbr(8 ),
145 ; ALN-NEXT: | 8, 0, 3, 0, 1, 7> | array(fix ed(7))>;
146 ; ALN-NEXT: 53:0| 2: <65533, 4, 1, 1, 0, 2,| @a2 = abbrev <1, vbr(8 ),
147 ; ALN-NEXT: | 8, 0, 3, 0, 4> | array(cha r6)>;
148 ; ALN-NEXT: 58:0| 2: <65533, 4, 1, 2, 0, 2,| @a3 = abbrev <2, vbr(8 ),
149 ; ALN-NEXT: | 8, 0, 3, 0, 4> | array(cha r6)>;
150 ; ALN-NEXT: 63:0| 3: <1, 11> | constants:
151 ; ALN-NEXT: 66:0| 2: <65533, 2, 1, 1, 0, 1,| @a0 = abbrev <1, fixed (3)>;
152 ; ALN-NEXT: | 3> |
153 ; ALN-NEXT: 70:0| 2: <65533, 2, 1, 4, 0, 2,| @a1 = abbrev <4, vbr(8 )>;
154 ; ALN-NEXT: | 8> |
155 ; ALN-NEXT: 74:0| 2: <65533, 2, 1, 4, 1, 0>| @a2 = abbrev <4, 0>;
156 ; ALN-NEXT: 78:0| 2: <65533, 2, 1, 6, 0, 2,| @a3 = abbrev <6, vbr(8 )>;
157 ; ALN-NEXT: | 8> |
158 ; ALN-NEXT: 82:0| 3: <1, 12> | function:
159 ; ALN-NEXT: 85:0| 2: <65533, 4, 1, 20, 0, | @a0 = abbrev <20, vbr( 6), vbr(4),
160 ; ALN-NEXT: | 2, 6, 0, 2, 4, 0, 2, | vbr(4)>;
161 ; ALN-NEXT: | 4> |
162 ; ALN-NEXT: 91:0| 2: <65533, 4, 1, 2, 0, 2,| @a1 = abbrev <2, vbr(6 ), vbr(6),
163 ; ALN-NEXT: | 6, 0, 2, 6, 0, 1, 4> | fixed(4)> ;
164 ; ALN-NEXT: 97:0| 2: <65533, 4, 1, 3, 0, 2,| @a2 = abbrev <3, vbr(6 ),
165 ; ALN-NEXT: | 6, 0, 1, 3, 0, 1, 4> | fixed(3), fixed(4)>;
166 ; ALN-NEXT: 103:0| 2: <65533, 1, 1, 10> | @a3 = abbrev <10>;
167 ; ALN-NEXT: 105:0| 2: <65533, 2, 1, 10, 0, | @a4 = abbrev <10, vbr( 6)>;
168 ; ALN-NEXT: | 2, 6> |
169 ; ALN-NEXT: 109:0| 2: <65533, 1, 1, 15> | @a5 = abbrev <15>;
170 ; ALN-NEXT: 111:0| 2: <65533, 3, 1, 43, 0, | @a6 = abbrev <43, vbr( 6),
171 ; ALN-NEXT: | 2, 6, 0, 1, 3> | fixed(3)> ;
172 ; ALN-NEXT: 116:0| 2: <65533, 4, 1, 24, 0, | @a7 = abbrev <24, vbr( 6), vbr(6),
173 ; ALN-NEXT: | 2, 6, 0, 2, 6, 0, 2, | vbr(4)>;
174 ; ALN-NEXT: | 4> |
175 ; ALN-NEXT: 122:0| 3: <1, 19> | globals:
176 ; ALN-NEXT: 125:0| 2: <65533, 3, 1, 0, 0, 2,| @a0 = abbrev <0, vbr(6 ),
177 ; ALN-NEXT: | 6, 0, 1, 1> | fixed(1)> ;
178 ; ALN-NEXT: 130:0| 2: <65533, 2, 1, 1, 0, 2,| @a1 = abbrev <1, vbr(8 )>;
179 ; ALN-NEXT: | 8> |
180 ; ALN-NEXT: 134:0| 2: <65533, 2, 1, 2, 0, 2,| @a2 = abbrev <2, vbr(8 )>;
181 ; ALN-NEXT: | 8> |
182 ; ALN-NEXT: 138:0| 2: <65533, 3, 1, 3, 0, 3,| @a3 = abbrev <3, array (fixed(8))>
183 ; ALN-NEXT: | 0, 1, 8> | ;
184 ; ALN-NEXT: 142:0| 2: <65533, 2, 1, 4, 0, 2,| @a4 = abbrev <4, vbr(6 )>;
185 ; ALN-NEXT: | 6> |
186 ; ALN-NEXT: 146:0| 2: <65533, 3, 1, 4, 0, 2,| @a5 = abbrev <4, vbr(6 ), vbr(6)>;
187 ; ALN-NEXT: | 6, 0, 2, 6> |
188 ; ALN-NEXT: 151:0| 0: <65534> | }
189 ; ALN-NEXT: 152:0| 1: <65535, 17, 3> | types { // BlockID = 17
190 ; ALN-NEXT: 160:0| 2: <65533, 4, 1, 21, 0, | %a0 = abbrev <21, fixed( 1),
191 ; ALN-NEXT: | 1, 1, 0, 3, 0, 1, 3> | array(fixe d(3))>;
192 ; ALN-NEXT: 165:0| 3: <1, 4> | count 4;
193 ; ALN-NEXT: 168:0| 3: <7, 32> | @t0 = i32;
194 ; ALN-NEXT: 172:0| 3: <2> | @t1 = void;
195 ; ALN-NEXT: 174:0| 4: <21, 0, 0, 0> | @t2 = i32 (i32); <%a0>
196 ; ALN-NEXT: 176:0| 3: <7, 1> | @t3 = i1;
197 ; ALN-NEXT: 179:0| 0: <65534> | }
198 ; ALN-NEXT: 180:0| 3: <8, 2, 0, 0, 0> | define external i32 @f0(i3 2);
199 ; ALN-NEXT: 185:0| 1: <65535, 19, 4> | globals { // BlockID = 19
200 ; ALN-NEXT: 192:0| 3: <5, 0> | count 0;
201 ; ALN-NEXT: 195:0| 0: <65534> | }
202 ; ALN-NEXT: 196:0| 1: <65535, 14, 3> | valuesymtab { // BlockID = 14
203 ; ALN-NEXT: 204:0| 6: <1, 0, 102, 97, 99, | @f0 : "fact"; <@a2>
204 ; ALN-NEXT: | 116> |
205 ; ALN-NEXT: 210:0| 0: <65534> | }
206 ; ALN-NEXT: 212:0| 1: <65535, 12, 4> | function i32 @f0(i32 %p0) {
207 ; ALN-NEXT: | | // BlockI D = 12
208 ; ALN-NEXT: 220:0| 3: <1, 3> | blocks 3;
209 ; ALN-NEXT: 223:0| 1: <65535, 11, 3> | constants { // BlockID = 11
210 ; ALN-NEXT: 232:0| 4: <1, 0> | i32: <@a0>
211 ; ALN-NEXT: 233:0| 5: <4, 2> | %c0 = i32 1; <@a1>
212 ; ALN-NEXT: 235:0| 6: <4, 0> | %c1 = i32 0; <@a2>
213 ; ALN-NEXT: 236:0| 0: <65534> | }
214 ; ALN-NEXT: | | %b0:
215 ; ALN-NEXT: 240:0| 3: <28, 1, 2, 32> | %v0 = icmp eq i32 %c1, % c0;
216 ; ALN-NEXT: 245:0| 3: <11, 1, 2, 1> | br i1 %v0, label %b1, la bel %b2;
217 ; ALN-NEXT: | | %b1:
218 ; ALN-NEXT: 250:0| 8: <10, 3> | ret i32 %c0; <@a4>
219 ; ALN-NEXT: | | %b2:
220 ; ALN-NEXT: 252:0| 5: <2, 4, 3, 1> | %v1 = sub i32 %p0, %c0; <@a1>
221 ; ALN-NEXT: 255:0| 3: <34, 0, 6, 1> | %v2 = call i32 @f0(i32 % v1);
222 ; ALN-NEXT: 260:0| 5: <2, 6, 1, 2> | %v3 = mul i32 %p0, %v2; <@a1>
223 ; ALN-NEXT: 263:0| 8: <10, 1> | ret i32 %v3; <@a4>
224 ; ALN-NEXT: 265:0| 1: <65535, 14, 3> | valuesymtab { // BlockI D = 14
225 ; ALN-NEXT: 272:0| 7: <2, 1, 116, 114, | %b1 : "true"; <@a3>
226 ; ALN-NEXT: | 117, 101> |
227 ; ALN-NEXT: 278:0| 6: <1, 4, 118, 49> | %v0 : "v1"; <@a2>
228 ; ALN-NEXT: 282:0| 6: <1, 5, 118, 50> | %v1 : "v2"; <@a2>
229 ; ALN-NEXT: 286:0| 6: <1, 6, 118, 51> | %v2 : "v3"; <@a2>
230 ; ALN-NEXT: 290:0| 6: <1, 7, 118, 52> | %v3 : "v4"; <@a2>
231 ; ALN-NEXT: 294:0| 7: <2, 2, 102, 97, 108,| %b2 : "false"; <@a3>
232 ; ALN-NEXT: | 115, 101> |
233 ; ALN-NEXT: 300:0| 6: <1, 1, 110> | %p0 : "n"; <@a2>
234 ; ALN-NEXT: 303:0| 0: <65534> | }
235 ; ALN-NEXT: 304:0| 0: <65534> | }
236 ; ALN-NEXT: 308:0|0: <65534> |}
237
129 ; NOABV: 0:0|<65532, 80, 69, 88, 69, 1, 0,|Magic Number: 'PEXE' (80, 69, 88, 69) 238 ; NOABV: 0:0|<65532, 80, 69, 88, 69, 1, 0,|Magic Number: 'PEXE' (80, 69, 88, 69)
130 ; NOABV-NEXT: | 8, 0, 17, 0, 4, 0, 2, 0, 0, |PNaCl Version: 2 239 ; NOABV-NEXT: | 8, 0, 17, 0, 4, 0, 2, 0, 0, |PNaCl Version: 2
131 ; NOABV-NEXT: | 0> | 240 ; NOABV-NEXT: | 0> |
132 ; NOABV-NEXT: 16:0|1: <65535, 8, 2> |module { // BlockID = 8 241 ; NOABV-NEXT: 16:0|1: <65535, 8, 2> |module { // BlockID = 8
133 ; NOABV-NEXT: 24:0| 3: <1, 1> | version 1; 242 ; NOABV-NEXT: 24:0| 3: <1, 1> | version 1;
134 ; NOABV-NEXT: 26:4| 1: <65535, 17, 2> | types { // BlockID = 17 243 ; NOABV-NEXT: 26:4| 1: <65535, 17, 2> | types { // BlockID = 17
135 ; NOABV-NEXT: 36:0| 3: <1, 4> | count 4; 244 ; NOABV-NEXT: 36:0| 3: <1, 4> | count 4;
136 ; NOABV-NEXT: 38:4| 3: <7, 32> | @t0 = i32; 245 ; NOABV-NEXT: 38:4| 3: <7, 32> | @t0 = i32;
137 ; NOABV-NEXT: 41:6| 3: <2> | @t1 = void; 246 ; NOABV-NEXT: 41:6| 3: <2> | @t1 = void;
138 ; NOABV-NEXT: 43:4| 3: <21, 0, 0, 0> | @t2 = i32 (i32); 247 ; NOABV-NEXT: 43:4| 3: <21, 0, 0, 0> | @t2 = i32 (i32);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 ; NOABV-NEXT: 160:4| 3: <1, 4, 118, 49> | %v0 : "v1"; 279 ; NOABV-NEXT: 160:4| 3: <1, 4, 118, 49> | %v0 : "v1";
171 ; NOABV-NEXT: 166:0| 3: <1, 5, 118, 50> | %v1 : "v2"; 280 ; NOABV-NEXT: 166:0| 3: <1, 5, 118, 50> | %v1 : "v2";
172 ; NOABV-NEXT: 171:4| 3: <1, 6, 118, 51> | %v2 : "v3"; 281 ; NOABV-NEXT: 171:4| 3: <1, 6, 118, 51> | %v2 : "v3";
173 ; NOABV-NEXT: 177:0| 3: <1, 7, 118, 52> | %v3 : "v4"; 282 ; NOABV-NEXT: 177:0| 3: <1, 7, 118, 52> | %v3 : "v4";
174 ; NOABV-NEXT: 182:4| 3: <2, 2, 102, 97, 108,| %b2 : "false"; 283 ; NOABV-NEXT: 182:4| 3: <2, 2, 102, 97, 108,| %b2 : "false";
175 ; NOABV-NEXT: | 115, 101> | 284 ; NOABV-NEXT: | 115, 101> |
176 ; NOABV-NEXT: 192:4| 3: <1, 1, 110> | %p0 : "n"; 285 ; NOABV-NEXT: 192:4| 3: <1, 1, 110> | %p0 : "n";
177 ; NOABV-NEXT: 196:4| 0: <65534> | } 286 ; NOABV-NEXT: 196:4| 0: <65534> | }
178 ; NOABV-NEXT: 200:0| 0: <65534> | } 287 ; NOABV-NEXT: 200:0| 0: <65534> | }
179 ; NOABV-NEXT: 204:0|0: <65534> |} 288 ; NOABV-NEXT: 204:0|0: <65534> |}
OLDNEW
« no previous file with comments | « lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp ('k') | unittests/Bitcode/NaClBitstreamReaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698