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

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

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 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/switch-ptr.ll ('k') | test/NaCl/Bitcode/vector.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 ; Tests that check how we handle supported and unsupported versions of
2 ; the same input. Includes code that tests that we loose names for
3 ; pointer casts in local value symbol tables.
4
5 define i8 @foo(i32 %i) {
6 %v1 = add i32 %i, %i
7 %v2 = inttoptr i32 %v1 to i8*
8 %v3 = load i8* %v2
9 ret i8 %v3
10 }
11
12 ; Test source effects of running with only supported bitcode features.
13 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-thaw | llvm-dis - \
14 ; RUN: | FileCheck %s -check-prefix=CSUP
15
16
17 ; CSUP: define i8 @foo(i32) {
18 ; CSUP-NEXT: %2 = add i32 %0, %0
19 ; CSUP-NEXT: %3 = inttoptr i32 %2 to i8*
20 ; CSUP-NEXT: %4 = load i8* %3
21 ; CSUP-NEXT: ret i8 %4
22 ; CSUP-NEXT: }
23
24 ; Test source effects of running with unsupported bitcode features.
25 ; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
26 ; RUN: | pnacl-thaw -allow-local-symbol-tables \
27 ; RUN: | llvm-dis - | FileCheck %s -check-prefix=CUNS
28
29 ; CUNS: define i8 @foo(i32 %i) {
30 ; CUNS-NEXT: %v1 = add i32 %i, %i
31 ; CUNS-NEXT: %1 = inttoptr i32 %v1 to i8*
32 ; CUNS-NEXT: %v3 = load i8* %1
33 ; CUNS-NEXT: ret i8 %v3
34 ; CUNS-NEXT: }
35
36 ; Test dump effects of running with only supported bitcode features.
37 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump-records \
38 ; RUN: | FileCheck %s -check-prefix=DSUP
39
40 ; DSUP: <MODULE_BLOCK>
41 ; DSUP-NEXT: <VERSION op0=1/>
42 ; DSUP-NEXT: <BLOCKINFO_BLOCK/>
43 ; DSUP-NEXT: <TYPE_BLOCK_ID>
44 ; DSUP-NEXT: <NUMENTRY op0=4/>
45 ; DSUP-NEXT: <INTEGER op0=32/>
46 ; DSUP-NEXT: <INTEGER op0=8/>
47 ; DSUP-NEXT: <FUNCTION op0=0 op1=1 op2=0/>
48 ; DSUP-NEXT: <VOID/>
49 ; DSUP-NEXT: </TYPE_BLOCK_ID>
50 ; DSUP-NEXT: <FUNCTION op0=2 op1=0 op2=0 op3=0/>
51 ; DSUP-NEXT: <GLOBALVAR_BLOCK>
52 ; DSUP-NEXT: <COUNT op0=0/>
53 ; DSUP-NEXT: </GLOBALVAR_BLOCK>
54 ; DSUP-NEXT: <VALUE_SYMTAB>
55 ; DSUP-NEXT: <ENTRY op0=0 op1=102 op2=111 op3=111/>
56 ; DSUP-NEXT: </VALUE_SYMTAB>
57 ; DSUP-NEXT: <FUNCTION_BLOCK>
58 ; DSUP-NEXT: <DECLAREBLOCKS op0=1/>
59 ; DSUP-NEXT: <INST_BINOP op0=1 op1=1 op2=0/>
60 ; DSUP-NEXT: <INST_LOAD op0=1 op1=0 op2=1/>
61 ; DSUP-NEXT: <INST_RET op0=1/>
62 ; DSUP-NEXT: </FUNCTION_BLOCK>
63 ; DSUP-NEXT: </MODULE_BLOCK>
64
65 ; Test dump effects of running with unsupported bitcode features.
66 ; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
67 ; RUN: | pnacl-bcanalyzer -dump-records \
68 ; RUN: | FileCheck %s -check-prefix=DUNS
69
70 ; DUNS: <MODULE_BLOCK>
71 ; DUNS-NEXT: <VERSION op0=1/>
72 ; DUNS-NEXT: <BLOCKINFO_BLOCK/>
73 ; DUNS-NEXT: <TYPE_BLOCK_ID>
74 ; DUNS-NEXT: <NUMENTRY op0=4/>
75 ; DUNS-NEXT: <INTEGER op0=32/>
76 ; DUNS-NEXT: <INTEGER op0=8/>
77 ; DUNS-NEXT: <FUNCTION op0=0 op1=1 op2=0/>
78 ; DUNS-NEXT: <VOID/>
79 ; DUNS-NEXT: </TYPE_BLOCK_ID>
80 ; DUNS-NEXT: <FUNCTION op0=2 op1=0 op2=0 op3=0/>
81 ; DUNS-NEXT: <GLOBALVAR_BLOCK>
82 ; DUNS-NEXT: <COUNT op0=0/>
83 ; DUNS-NEXT: </GLOBALVAR_BLOCK>
84 ; DUNS-NEXT: <VALUE_SYMTAB>
85 ; DUNS-NEXT: <ENTRY op0=0 op1=102 op2=111 op3=111/>
86 ; DUNS-NEXT: </VALUE_SYMTAB>
87 ; DUNS-NEXT: <FUNCTION_BLOCK>
88 ; DUNS-NEXT: <DECLAREBLOCKS op0=1/>
89 ; DUNS-NEXT: <INST_BINOP op0=1 op1=1 op2=0/>
90 ; DUNS-NEXT: <INST_LOAD op0=1 op1=0 op2=1/>
91 ; DUNS-NEXT: <INST_RET op0=1/>
92 ; DUNS-NEXT: <VALUE_SYMTAB>
93 ; DUNS-NEXT: <ENTRY op0=2 op1=118 op2=49/>
94 ; DUNS-NEXT: <ENTRY op0=1 op1=105/>
95 ; DUNS-NEXT: <ENTRY op0=3 op1=118 op2=51/>
96 ; DUNS-NEXT: </VALUE_SYMTAB>
97 ; DUNS-NEXT: </FUNCTION_BLOCK>
98 ; DUNS-NEXT: </MODULE_BLOCK>
OLDNEW
« no previous file with comments | « test/NaCl/Bitcode/switch-ptr.ll ('k') | test/NaCl/Bitcode/vector.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698