blob: 1798e31e47dca8169e09f0b2abad85f6c4ac6a62 [file] [log] [blame]
Chris Lattnerf2b6b022002-08-20 19:34:51 +00001; This file is used by testlink1.ll, so it doesn't actually do anything itself
2;
Reid Spencer0fb79b92007-01-27 21:08:29 +00003; RUN: true
Chris Lattner285c68d2001-10-13 07:15:38 +00004
Chris Lattner1afcace2011-07-09 17:41:24 +00005%intlist = type { %intlist*, i32 }
6
7
8%Ty1 = type { %Ty2* }
9%Ty2 = type opaque
10
11@GVTy1 = global %Ty1* null
12@GVTy2 = external global %Ty2*
13
14
15@MyVar = global i32 4
16@MyIntList = external global %intlist
17@AConst = constant i32 1234
Chris Lattner285c68d2001-10-13 07:15:38 +000018
Tanya Lattnerceca1942008-03-10 07:21:50 +000019;; Intern in both testlink[12].ll
Chris Lattner1afcace2011-07-09 17:41:24 +000020@Intern1 = internal constant i32 52
Chris Lattner285c68d2001-10-13 07:15:38 +000021
Tanya Lattnerceca1942008-03-10 07:21:50 +000022;; Intern in one but not in other
Chris Lattner1afcace2011-07-09 17:41:24 +000023@Intern2 = constant i32 12345
Chris Lattnerb4b07c72001-11-26 19:17:06 +000024
Chris Lattner1afcace2011-07-09 17:41:24 +000025@MyIntListPtr = constant { %intlist* } { %intlist* @MyIntList }
26@MyVarPtr = linkonce global { i32* } { i32* @MyVar }
27@0 = constant i32 412
28
29; Provides definition of Struct1 and of S1GV.
30%Struct1 = type { i32 }
31@S1GV = global %Struct1* null
Chris Lattner230e5ef2001-10-15 03:11:58 +000032
Tanya Lattnerceca1942008-03-10 07:21:50 +000033define i32 @foo(i32 %blah) {
Chris Lattner1afcace2011-07-09 17:41:24 +000034 store i32 %blah, i32* @MyVar
35 %idx = getelementptr %intlist* @MyIntList, i64 0, i32 1
36 store i32 12, i32* %idx
37 %ack = load i32* @0
38 %fzo = add i32 %ack, %blah
39 ret i32 %fzo
Tanya Lattnerceca1942008-03-10 07:21:50 +000040}
Chris Lattner784c52f2001-10-14 23:28:56 +000041
Tanya Lattnerceca1942008-03-10 07:21:50 +000042declare void @unimp(float, double)
Chris Lattner285c68d2001-10-13 07:15:38 +000043
Tanya Lattnerceca1942008-03-10 07:21:50 +000044define internal void @testintern() {
Chris Lattner1afcace2011-07-09 17:41:24 +000045 ret void
Tanya Lattnerceca1942008-03-10 07:21:50 +000046}
Chris Lattner784c52f2001-10-14 23:28:56 +000047
Tanya Lattnerceca1942008-03-10 07:21:50 +000048define void @Testintern() {
Chris Lattner1afcace2011-07-09 17:41:24 +000049 ret void
Tanya Lattnerceca1942008-03-10 07:21:50 +000050}
Chris Lattner285c68d2001-10-13 07:15:38 +000051
Tanya Lattnerceca1942008-03-10 07:21:50 +000052define internal void @testIntern() {
Chris Lattner1afcace2011-07-09 17:41:24 +000053 ret void
Tanya Lattnerceca1942008-03-10 07:21:50 +000054}
Chris Lattnerb4b07c72001-11-26 19:17:06 +000055