blob: f119618a902ab27c63295878672c4abb996764ac [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;
3; RUN: echo
Chris Lattner285c68d2001-10-13 07:15:38 +00004
5%MyVar = global int 4
6%MyIntList = uninitialized global { \2 *, int }
7
8%AConst = constant int 123
9
Chris Lattnerb4b07c72001-11-26 19:17:06 +000010%Intern1 = internal constant int 52 ;; Intern in both testlink[12].ll
11%Intern2 = constant int 12345 ;; Intern in one but not in other
12
Chris Lattner230e5ef2001-10-15 03:11:58 +000013%MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList }
14%MyVarPtr = global { int * } { int * %MyVar }
15
Chris Lattner784c52f2001-10-14 23:28:56 +000016constant int 412
17
Chris Lattner285c68d2001-10-13 07:15:38 +000018implementation
19
20int "foo"(int %blah)
21begin
22 store int %blah, int *%MyVar
Chris Lattnerac2cbb82002-08-22 16:39:05 +000023 %idx = getelementptr { \2 *, int } * %MyIntList, uint 0, ubyte 1
24 store int 12, int* %idx
Chris Lattner784c52f2001-10-14 23:28:56 +000025
Chris Lattner230e5ef2001-10-15 03:11:58 +000026 %ack = load int * %0 ;; Load from the unnamed constant
27 %fzo = add int %ack, %blah
28 ret int %fzo
Chris Lattner285c68d2001-10-13 07:15:38 +000029end
30
Chris Lattner784c52f2001-10-14 23:28:56 +000031declare void "unimp"(float, double)
Chris Lattnerb4b07c72001-11-26 19:17:06 +000032
33internal void "testintern"() begin ret void end
34 void "Testintern"() begin ret void end
35internal void "testIntern"() begin ret void end
36