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

Side by Side Diff: test/NaCl/Bitcode/no-structs.ll

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: 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 ; Tests that even though global variables can define structured types, 1 ; Tests that even though global variables can define structured types,
2 ; they types are not put into the bitcode file. 2 ; they types are not put into the bitcode file.
3 3
4 ; RUN: llvm-as < %s | pnacl-freeze \ 4 ; RUN: llvm-as < %s | pnacl-freeze \
5 ; RUN: | pnacl-bcanalyzer -dump-records \ 5 ; RUN: | pnacl-bcanalyzer -dump-records \
6 ; RUN: | FileCheck %s -check-prefix=PF2 6 ; RUN: | FileCheck %s -check-prefix=PF2
7 7
8 declare void @func() 8 declare void @func()
9 9
10 @compound = internal global <{ [4 x i8], i32 }> 10 @compound = internal global <{ [4 x i8], i32 }>
11 <{ [4 x i8] c"home", i32 ptrtoint (void ()* @func to i32) }> 11 <{ [4 x i8] c"home", i32 ptrtoint (void ()* @func to i32) }>
12 12
13 define void @CheckBitcastGlobal() { 13 define void @CheckBitcastGlobal() {
14 %1 = bitcast <{ [4 x i8], i32}>* @compound to i32* 14 %1 = bitcast <{ [4 x i8], i32}>* @compound to i32*
15 %2 = load i32* %1, align 4 15 %2 = load i32, i32* %1, align 4
16 ret void 16 ret void
17 } 17 }
18 18
19 define void @CheckPtrToIntGlobal() { 19 define void @CheckPtrToIntGlobal() {
20 %1 = ptrtoint <{ [4 x i8], i32 }>* @compound to i32 20 %1 = ptrtoint <{ [4 x i8], i32 }>* @compound to i32
21 %2 = add i32 %1, 0 21 %2 = add i32 %1, 0
22 ret void 22 ret void
23 } 23 }
24 24
25 ; Note that it doesn't define a struct type. 25 ; Note that it doesn't define a struct type.
26 26
27 ; PF2: <TYPE_BLOCK_ID> 27 ; PF2: <TYPE_BLOCK_ID>
28 ; PF2-NEXT: <NUMENTRY op0=3/> 28 ; PF2-NEXT: <NUMENTRY op0=3/>
29 ; PF2-NEXT: <INTEGER op0=32/> 29 ; PF2-NEXT: <INTEGER op0=32/>
30 ; PF2-NEXT: <VOID/> 30 ; PF2-NEXT: <VOID/>
31 ; PF2-NEXT: <FUNCTION op0=0 op1=1/> 31 ; PF2-NEXT: <FUNCTION op0=0 op1=1/>
32 ; PF2-NEXT: </TYPE_BLOCK_ID> 32 ; PF2-NEXT: </TYPE_BLOCK_ID>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698