llvm.org GIT mirror llvm / 801e5a9
Fix test case. Chris didn't do make check. :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43698 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 12 years ago
1 changed file(s) with 18 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin -o %t1 -f
0 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin -o %t1 -f
11 ; RUN: grep GOTPCREL %t1 | count 4
22 ; RUN: grep rip %t1 | count 6
33 ; RUN: grep movq %t1 | count 6
44 ; RUN: grep leaq %t1 | count 1
5 ; RUN: llvm-upgrade < %s | llvm-as | \
5 ; RUN: llvm-as < %s | \
66 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=static -o %t2 -f
7 ; RUN: grep rip %t2 | count 4
87 ; RUN: grep movl %t2 | count 2
98 ; RUN: grep movq %t2 | count 2
109
11 %ptr = external global int*
12 %src = external global [0 x int]
13 %dst = external global [0 x int]
14 %lptr = internal global int* null
15 %ldst = internal global [500 x int] zeroinitializer, align 32
16 %lsrc = internal global [500 x int] zeroinitializer, align 32
17 %bsrc = internal global [500000 x int] zeroinitializer, align 32
18 %bdst = internal global [500000 x int] zeroinitializer, align 32
10 @ptr = external global i32* ; [#uses=1]
11 @src = external global [0 x i32] ; <[0 x i32]*> [#uses=1]
12 @dst = external global [0 x i32] ; <[0 x i32]*> [#uses=1]
13 @lptr = internal global i32* null ; [#uses=1]
14 @ldst = internal global [500 x i32] zeroinitializer, align 32 ; <[500 x i32]*> [#uses=1]
15 @lsrc = internal global [500 x i32] zeroinitializer, align 32 ; <[500 x i32]*> [#uses=0]
16 @bsrc = internal global [500000 x i32] zeroinitializer, align 32 ; <[500000 x i32]*> [#uses=0]
17 @bdst = internal global [500000 x i32] zeroinitializer, align 32 ; <[500000 x i32]*> [#uses=0]
1918
20 void %test1() {
21 %tmp = load int* getelementptr ([0 x int]* %src, int 0, int 0)
22 store int %tmp, int* getelementptr ([0 x int]* %dst, int 0, int 0)
19 define void @test1() {
20 %tmp = load i32* getelementptr ([0 x i32]* @src, i32 0, i32 0) ; [#uses=1]
21 store i32 %tmp, i32* getelementptr ([0 x i32]* @dst, i32 0, i32 0)
2322 ret void
2423 }
2524
26 void %test2() {
27 store int* getelementptr ([0 x int]* %dst, int 0, int 0), int** %ptr
25 define void @test2() {
26 store i32* getelementptr ([0 x i32]* @dst, i32 0, i32 0), i32** @ptr
2827 ret void
2928 }
3029
31 void %test3() {
32 store int* getelementptr ([500 x int]* %ldst, int 0, int 0), int** %lptr
30 define void @test3() {
31 store i32* getelementptr ([500 x i32]* @ldst, i32 0, i32 0), i32** @lptr
3332 br label %return
3433
35 return:
34 return: ; preds = %0
3635 ret void
3736 }