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

Side by Side Diff: test/NaCl/X86/no-global-in-disp-x86-64.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 ; RUN: pnacl-llc -O2 -mtriple=x86_64-none-nacl < %s | \ 1 ; RUN: pnacl-llc -O2 -mtriple=x86_64-none-nacl < %s | \
2 ; RUN: FileCheck %s --check-prefix=NACLON 2 ; RUN: FileCheck %s --check-prefix=NACLON
3 ; RUN: pnacl-llc -O2 -mtriple=x86_64-linux < %s | \ 3 ; RUN: pnacl-llc -O2 -mtriple=x86_64-linux < %s | \
4 ; RUN: FileCheck %s --check-prefix=NACLOFF 4 ; RUN: FileCheck %s --check-prefix=NACLOFF
5 5
6 ; This test is derived from the following C code: 6 ; This test is derived from the following C code:
7 ; 7 ;
8 ; int myglobal[100]; 8 ; int myglobal[100];
9 ; void test(int arg) 9 ; void test(int arg)
10 ; { 10 ; {
(...skipping 19 matching lines...) Expand all
30 @myglobal = global [100 x i32] zeroinitializer, align 4 30 @myglobal = global [100 x i32] zeroinitializer, align 4
31 31
32 define void @test(i32 %arg) #0 { 32 define void @test(i32 %arg) #0 {
33 entry: 33 entry:
34 ; NACLON: test: 34 ; NACLON: test:
35 ; NACLON-NOT: mov{{.*}}nacl:myglobal( 35 ; NACLON-NOT: mov{{.*}}nacl:myglobal(
36 ; NACLOFF: test: 36 ; NACLOFF: test:
37 ; NACLOFF: mov{{.*}}myglobal( 37 ; NACLOFF: mov{{.*}}myglobal(
38 %arg.addr = alloca i32, align 4 38 %arg.addr = alloca i32, align 4
39 store i32 %arg, i32* %arg.addr, align 4 39 store i32 %arg, i32* %arg.addr, align 4
40 %0 = load i32* %arg.addr, align 4 40 %0 = load i32, i32* %arg.addr, align 4
41 %1 = load i32* %arg.addr, align 4 41 %1 = load i32, i32* %arg.addr, align 4
42 %arrayidx = getelementptr inbounds [100 x i32]* @myglobal, i32 0, i32 %1 42 %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* @myglobal, i32 0, i32 %1
43 store i32 %0, i32* %arrayidx, align 4 43 store i32 %0, i32* %arrayidx, align 4
44 %2 = load i32* %arg.addr, align 4 44 %2 = load i32, i32* %arg.addr, align 4
45 %3 = load i32* %arg.addr, align 4 45 %3 = load i32, i32* %arg.addr, align 4
46 %add = add nsw i32 %3, 1 46 %add = add nsw i32 %3, 1
47 %arrayidx1 = getelementptr inbounds [100 x i32]* @myglobal, i32 0, i32 %add 47 %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* @myglobal, i32 0 , i32 %add
48 store i32 %2, i32* %arrayidx1, align 4 48 store i32 %2, i32* %arrayidx1, align 4
49 ret void 49 ret void
50 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698