blob: 930383d8e9622fc7f106df4b7f0dbaa3dbe52ef5 [file] [log] [blame]
Reid Spencereb1d74e2007-04-16 17:36:08 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin -o %t1 -f
Dan Gohman28beeea2007-08-15 13:36:28 +00002; RUN: grep GOTPCREL %t1 | count 4
3; RUN: grep rip %t1 | count 6
4; RUN: grep movq %t1 | count 6
5; RUN: grep leaq %t1 | count 1
Reid Spencereb1d74e2007-04-16 17:36:08 +00006; RUN: llvm-upgrade < %s | llvm-as | \
Evan Cheng0a2a5152007-08-02 05:04:16 +00007; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=static -o %t2 -f
Dan Gohman28beeea2007-08-15 13:36:28 +00008; RUN: grep rip %t2 | count 4
9; RUN: grep movl %t2 | count 2
10; RUN: grep movq %t2 | count 2
Evan Chenga5cb5642006-11-30 22:07:00 +000011
12%ptr = external global int*
13%src = external global [0 x int]
14%dst = external global [0 x int]
15%lptr = internal global int* null
16%ldst = internal global [500 x int] zeroinitializer, align 32
17%lsrc = internal global [500 x int] zeroinitializer, align 32
18%bsrc = internal global [500000 x int] zeroinitializer, align 32
19%bdst = internal global [500000 x int] zeroinitializer, align 32
20
21void %test1() {
22 %tmp = load int* getelementptr ([0 x int]* %src, int 0, int 0)
23 store int %tmp, int* getelementptr ([0 x int]* %dst, int 0, int 0)
24 ret void
25}
26
27void %test2() {
28 store int* getelementptr ([0 x int]* %dst, int 0, int 0), int** %ptr
29 ret void
30}
31
32void %test3() {
33 store int* getelementptr ([500 x int]* %ldst, int 0, int 0), int** %lptr
34 br label %return
35
36return:
37 ret void
38}