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

Side by Side Diff: tests_lit/llvm2ice_tests/global.ll

Issue 358013003: Subzero: Partial implementation of global initializers. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: After rebasing from laster master Created 6 years, 5 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/llvm2ice_tests/convert.ll ('k') | tests_lit/llvm2ice_tests/globalinit.pnacl.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Trivial test of the use of internal versus external global 1 ; Trivial test of the use of internal versus external global
2 ; functions. 2 ; variables.
3 3
4 ; RUN: %llvm2ice --verbose inst %s | FileCheck %s 4 ; RUN: %llvm2ice --verbose inst %s | FileCheck %s
5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s 5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
6 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s 6 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
7 7
8 ; Note: We don't run this test using a PNaCl bitcode file, because 8 @intern_global = internal global [4 x i8] c"\00\00\00\0C", align 4
9 ; external globals are not in the PNaCl ABI.
10
11 @intern_global = global [4 x i8] [i8 0, i8 0, i8 0, i8 12], align 4
12 @extern_global = external global [4 x i8] 9 @extern_global = external global [4 x i8]
13 10
14 define i32 @test_intern_global() { 11 define i32 @test_intern_global() {
15 ; CHECK: define i32 @test_intern_global 12 ; CHECK: define i32 @test_intern_global
16 entry: 13 entry:
17 %__1 = bitcast [4 x i8]* @intern_global to i32* 14 %__1 = bitcast [4 x i8]* @intern_global to i32*
18 %v0 = load i32* %__1, align 1 15 %v0 = load i32* %__1, align 1
19 ret i32 %v0 16 ret i32 %v0
20 } 17 }
21 18
22 define i32 @test_extern_global() { 19 define i32 @test_extern_global() {
23 ; CHECK: define i32 @test_extern_global 20 ; CHECK: define i32 @test_extern_global
24 entry: 21 entry:
25 %__1 = bitcast [4 x i8]* @extern_global to i32* 22 %__1 = bitcast [4 x i8]* @extern_global to i32*
26 %v0 = load i32* %__1, align 1 23 %v0 = load i32* %__1, align 1
27 ret i32 %v0 24 ret i32 %v0
28 } 25 }
29 26
30 ; ERRORS-NOT: ICE translation error 27 ; ERRORS-NOT: ICE translation error
31 ; DUMP-NOT: SZ 28 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/convert.ll ('k') | tests_lit/llvm2ice_tests/globalinit.pnacl.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698