blob: d243e3c7d1a30e1931f0ef8561ac95c0e34c9c31 [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
Tanya Lattnerceca1942008-03-10 07:21:50 +00005@MyVar = global i32 4 ; <i32*> [#uses=2]
6@MyIntList = external global { \2*, i32 } ; <{ \2*, i32 }*> [#uses=2]
7@AConst = constant i32 123 ; <i32*> [#uses=0]
Chris Lattner285c68d2001-10-13 07:15:38 +00008
Tanya Lattnerceca1942008-03-10 07:21:50 +00009;; Intern in both testlink[12].ll
10@Intern1 = internal constant i32 52 ; <i32*> [#uses=0]
Chris Lattner285c68d2001-10-13 07:15:38 +000011
Tanya Lattnerceca1942008-03-10 07:21:50 +000012;; Intern in one but not in other
13@Intern2 = constant i32 12345 ; <i32*> [#uses=0]
Chris Lattnerb4b07c72001-11-26 19:17:06 +000014
Tanya Lattnerceca1942008-03-10 07:21:50 +000015@MyIntListPtr = constant { { \2*, i32 }* } { { \2*, i32 }* @MyIntList } ; <{ { \2*, i32 }* }*> [#uses=0]
16@MyVarPtr = linkonce global { i32* } { i32* @MyVar } ; <{ i32* }*> [#uses=0]
17constant i32 412 ; <i32*>:0 [#uses=1]
Chris Lattner230e5ef2001-10-15 03:11:58 +000018
Tanya Lattnerceca1942008-03-10 07:21:50 +000019define i32 @foo(i32 %blah) {
20 store i32 %blah, i32* @MyVar
21 %idx = getelementptr { \2*, i32 }* @MyIntList, i64 0, i32 1 ; <i32*> [#uses=1]
22 store i32 12, i32* %idx
23 %ack = load i32* @0 ; <i32> [#uses=1]
24 %fzo = add i32 %ack, %blah ; <i32> [#uses=1]
25 ret i32 %fzo
26}
Chris Lattner784c52f2001-10-14 23:28:56 +000027
Tanya Lattnerceca1942008-03-10 07:21:50 +000028declare void @unimp(float, double)
Chris Lattner285c68d2001-10-13 07:15:38 +000029
Tanya Lattnerceca1942008-03-10 07:21:50 +000030define internal void @testintern() {
31 ret void
32}
Chris Lattner784c52f2001-10-14 23:28:56 +000033
Tanya Lattnerceca1942008-03-10 07:21:50 +000034define void @Testintern() {
35 ret void
36}
Chris Lattner285c68d2001-10-13 07:15:38 +000037
Tanya Lattnerceca1942008-03-10 07:21:50 +000038define internal void @testIntern() {
39 ret void
40}
Chris Lattnerb4b07c72001-11-26 19:17:06 +000041