| OLD | NEW |
| 1 ; Tests that check how we handle supported and unsupported versions of | 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 | 2 ; the same input. Includes code that tests that we loose names for |
| 3 ; pointer casts in local value symbol tables. | 3 ; pointer casts in local value symbol tables. |
| 4 | 4 |
| 5 define i8 @foo(i32 %i) { | 5 define i8 @foo(i32 %i) { |
| 6 %v1 = add i32 %i, %i | 6 %v1 = add i32 %i, %i |
| 7 %v2 = inttoptr i32 %v1 to i8* | 7 %v2 = inttoptr i32 %v1 to i8* |
| 8 %v3 = load i8* %v2 | 8 %v3 = load i8, i8* %v2 |
| 9 ret i8 %v3 | 9 ret i8 %v3 |
| 10 } | 10 } |
| 11 | 11 |
| 12 ; Test source effects of running with only supported bitcode features. | 12 ; Test source effects of running with only supported bitcode features. |
| 13 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-thaw | llvm-dis - \ | 13 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-thaw | llvm-dis - \ |
| 14 ; RUN: | FileCheck %s -check-prefix=CSUP | 14 ; RUN: | FileCheck %s -check-prefix=CSUP |
| 15 | 15 |
| 16 | 16 |
| 17 ; CSUP: define i8 @foo(i32) { | 17 ; CSUP: define i8 @foo(i32) { |
| 18 ; CSUP-NEXT: %2 = add i32 %0, %0 | 18 ; CSUP-NEXT: %2 = add i32 %0, %0 |
| 19 ; CSUP-NEXT: %3 = inttoptr i32 %2 to i8* | 19 ; CSUP-NEXT: %3 = inttoptr i32 %2 to i8* |
| 20 ; CSUP-NEXT: %4 = load i8* %3 | 20 ; CSUP-NEXT: %4 = load i8, i8* %3 |
| 21 ; CSUP-NEXT: ret i8 %4 | 21 ; CSUP-NEXT: ret i8 %4 |
| 22 ; CSUP-NEXT: } | 22 ; CSUP-NEXT: } |
| 23 | 23 |
| 24 ; Test source effects of running with unsupported bitcode features. | 24 ; Test source effects of running with unsupported bitcode features. |
| 25 ; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \ | 25 ; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \ |
| 26 ; RUN: | pnacl-thaw -allow-local-symbol-tables \ | 26 ; RUN: | pnacl-thaw -allow-local-symbol-tables \ |
| 27 ; RUN: | llvm-dis - | FileCheck %s -check-prefix=CUNS | 27 ; RUN: | llvm-dis - | FileCheck %s -check-prefix=CUNS |
| 28 | 28 |
| 29 ; CUNS: define i8 @foo(i32 %i) { | 29 ; CUNS: define i8 @foo(i32 %i) { |
| 30 ; CUNS-NEXT: %v1 = add i32 %i, %i | 30 ; CUNS-NEXT: %v1 = add i32 %i, %i |
| 31 ; CUNS-NEXT: %1 = inttoptr i32 %v1 to i8* | 31 ; CUNS-NEXT: %1 = inttoptr i32 %v1 to i8* |
| 32 ; CUNS-NEXT: %v3 = load i8* %1 | 32 ; CUNS-NEXT: %v3 = load i8, i8* %1 |
| 33 ; CUNS-NEXT: ret i8 %v3 | 33 ; CUNS-NEXT: ret i8 %v3 |
| 34 ; CUNS-NEXT: } | 34 ; CUNS-NEXT: } |
| 35 | 35 |
| 36 ; Test dump effects of running with only supported bitcode features. | 36 ; Test dump effects of running with only supported bitcode features. |
| 37 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump-records \ | 37 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump-records \ |
| 38 ; RUN: | FileCheck %s -check-prefix=DSUP | 38 ; RUN: | FileCheck %s -check-prefix=DSUP |
| 39 | 39 |
| 40 ; DSUP: <MODULE_BLOCK> | 40 ; DSUP: <MODULE_BLOCK> |
| 41 ; DSUP-NEXT: <VERSION op0=1/> | 41 ; DSUP-NEXT: <VERSION op0=1/> |
| 42 ; DSUP-NEXT: <BLOCKINFO_BLOCK/> | 42 ; DSUP-NEXT: <BLOCKINFO_BLOCK/> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 ; DUNS-NEXT: <INST_BINOP op0=1 op1=1 op2=0/> | 89 ; DUNS-NEXT: <INST_BINOP op0=1 op1=1 op2=0/> |
| 90 ; DUNS-NEXT: <INST_LOAD op0=1 op1=0 op2=1/> | 90 ; DUNS-NEXT: <INST_LOAD op0=1 op1=0 op2=1/> |
| 91 ; DUNS-NEXT: <INST_RET op0=1/> | 91 ; DUNS-NEXT: <INST_RET op0=1/> |
| 92 ; DUNS-NEXT: <VALUE_SYMTAB> | 92 ; DUNS-NEXT: <VALUE_SYMTAB> |
| 93 ; DUNS-NEXT: <ENTRY op0=2 op1=118 op2=49/> | 93 ; DUNS-NEXT: <ENTRY op0=2 op1=118 op2=49/> |
| 94 ; DUNS-NEXT: <ENTRY op0=1 op1=105/> | 94 ; DUNS-NEXT: <ENTRY op0=1 op1=105/> |
| 95 ; DUNS-NEXT: <ENTRY op0=3 op1=118 op2=51/> | 95 ; DUNS-NEXT: <ENTRY op0=3 op1=118 op2=51/> |
| 96 ; DUNS-NEXT: </VALUE_SYMTAB> | 96 ; DUNS-NEXT: </VALUE_SYMTAB> |
| 97 ; DUNS-NEXT: </FUNCTION_BLOCK> | 97 ; DUNS-NEXT: </FUNCTION_BLOCK> |
| 98 ; DUNS-NEXT: </MODULE_BLOCK> | 98 ; DUNS-NEXT: </MODULE_BLOCK> |
| OLD | NEW |