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

Side by Side Diff: tests_lit/reader_tests/unnamed.ll

Issue 624663002: Introduce model of global initializers in Subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 6 years, 2 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 | « tests_lit/reader_tests/globalrelocs.ll ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Tests that we name unnamed global addresses. 1 ; Tests that we name unnamed global addresses.
2 2
3 ; RUN: %p2i --no-local-syms -i %s --insts | FileCheck %s 3 ; Check that the ICE converter handles renaming correctly.
4 ; RUN: %l2i --no-local-syms -i %s --insts | FileCheck %s
4 5
5 ; RUN: %p2i --no-local-syms -i %s --insts --args \ 6 ; RUN: %l2i --no-local-syms -i %s --insts --args --exit-success \
6 ; RUN: -default-function-prefix=h -default-global-prefix=g \ 7 ; RUN: -default-function-prefix=h -default-global-prefix=g \
7 ; RUN: | FileCheck --check-prefix=BAD %s 8 ; RUN: | FileCheck --check-prefix=BAD %s
8 9
10 ; Check that Subzero's bitcode reader handles renaming correctly.
11 ; RUN: %p2i --no-local-syms -i %s --insts | FileCheck %s
12
13 ; RUN: %p2i --no-local-syms -i %s --insts --args --exit-success \
14 ; RUN: -default-function-prefix=h -default-global-prefix=g \
15 ; RUN: | FileCheck --check-prefix=BAD %s
16
9 ; TODO(kschimpf) Check global variable declarations, once generated. 17 ; TODO(kschimpf) Check global variable declarations, once generated.
10 18
11 @0 = internal global [4 x i8] zeroinitializer, align 4 19 @0 = internal global [4 x i8] zeroinitializer, align 4
12 @1 = internal constant [10 x i8] c"Some stuff", align 1 20 @1 = internal constant [10 x i8] c"Some stuff", align 1
13 @g = internal global [4 x i8] zeroinitializer, align 4 21 @g = internal global [4 x i8] zeroinitializer, align 4
14 22
15 ; BAD: Warning: Default global prefix 'g' conflicts with name 'g'.
16
17 define i32 @2(i32 %v) { 23 define i32 @2(i32 %v) {
18 ret i32 %v 24 ret i32 %v
19 } 25 }
20 26
21 ; CHECK: define i32 @Function(i32 %__0) { 27 ; CHECK: define i32 @Function(i32 %__0) {
22 ; CHECK-NEXT: __0: 28 ; CHECK-NEXT: __0:
23 ; CHECK-NEXT: ret i32 %__0 29 ; CHECK-NEXT: ret i32 %__0
24 ; CHECK-NEXT: } 30 ; CHECK-NEXT: }
25 31
26 define void @hg() { 32 define void @hg() {
27 ret void 33 ret void
28 } 34 }
29 35
30 ; BAD: Warning: Default function prefix 'h' conflicts with name 'hg'.
31 36
32 ; CHECK-NEXT: define void @hg() { 37 ; CHECK-NEXT: define void @hg() {
33 ; CHECK-NEXT: __0: 38 ; CHECK-NEXT: __0:
34 ; CHECK-NEXT: ret void 39 ; CHECK-NEXT: ret void
35 ; CHECK-NEXT: } 40 ; CHECK-NEXT: }
36 41
37 define void @3() { 42 define void @3() {
38 ret void 43 ret void
39 } 44 }
40 45
41 ; CHECK-NEXT: define void @Function1() { 46 ; CHECK-NEXT: define void @Function1() {
42 ; CHECK-NEXT: __0: 47 ; CHECK-NEXT: __0:
43 ; CHECK-NEXT: ret void 48 ; CHECK-NEXT: ret void
44 ; CHECK-NEXT: } 49 ; CHECK-NEXT: }
50
51 define void @h5() {
52 ret void
53 }
54
55 ; CHECK-NEXT: define void @h5() {
56 ; CHECK-NEXT: __0:
57 ; CHECK-NEXT: ret void
58 ; CHECK-NEXT: }
59
60 ; BAD: Warning : Default global prefix 'g' potentially conflicts with name 'g'.
61 ; BAD: Warning : Default function prefix 'h' potentially conflicts with name 'h5 '.
OLDNEW
« no previous file with comments | « tests_lit/reader_tests/globalrelocs.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698