llvm.org GIT mirror llvm / 5bc20c7
New testcase for testing constant pointers to globals git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@784 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 18 years ago
1 changed file(s) with 23 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; This testcase is primarily used for testing that global values can be used as
1 ; constant pointer initializers. This is tricky because they can be forward
2 ; declared and involves an icky bytecode encoding. There is no meaningful
3 ; optimization that can be performed on this file, it is just here to test
4 ; assembly and disassembly.
5 ;
6
7
8 %t3 = global int * %t1 ;; Forward reference
9 %t1 = global int 4
10 %t2 = global int * %t1
11
12 global float * %0 ;; Forward numeric reference
13 global float * %0 ;; Duplicate forward numeric reference
14 global float 0.0
15 global float * %0 ;; Numeric reference
16
17
18 %fptr = global void() * %f ;; Forward ref method defn
19 declare void "f"() ;; External method
20
21 implementation
22