Chris Lattner | f2b6b02 | 2002-08-20 19:34:51 +0000 | [diff] [blame] | 1 | ; This file is used by testlink1.ll, so it doesn't actually do anything itself |
| 2 | ; |
| 3 | ; RUN: echo |
Chris Lattner | 285c68d | 2001-10-13 07:15:38 +0000 | [diff] [blame] | 4 | |
| 5 | %MyVar = global int 4 |
Chris Lattner | 8869c2c | 2003-04-21 21:06:25 +0000 | [diff] [blame] | 6 | %MyIntList = external global { \2 *, int } |
Chris Lattner | 285c68d | 2001-10-13 07:15:38 +0000 | [diff] [blame] | 7 | |
| 8 | %AConst = constant int 123 |
| 9 | |
Chris Lattner | b4b07c7 | 2001-11-26 19:17:06 +0000 | [diff] [blame] | 10 | %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 Lattner | 230e5ef | 2001-10-15 03:11:58 +0000 | [diff] [blame] | 13 | %MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList } |
Chris Lattner | e709a21 | 2003-04-23 18:38:13 +0000 | [diff] [blame] | 14 | %MyVarPtr = linkonce global { int * } { int * %MyVar } |
Chris Lattner | 230e5ef | 2001-10-15 03:11:58 +0000 | [diff] [blame] | 15 | |
Chris Lattner | 784c52f | 2001-10-14 23:28:56 +0000 | [diff] [blame] | 16 | constant int 412 |
| 17 | |
Chris Lattner | 285c68d | 2001-10-13 07:15:38 +0000 | [diff] [blame] | 18 | implementation |
| 19 | |
| 20 | int "foo"(int %blah) |
| 21 | begin |
| 22 | store int %blah, int *%MyVar |
Reid Spencer | e5d4efa | 2006-11-23 15:14:52 +0000 | [diff] [blame^] | 23 | %idx = getelementptr { \2 *, int } * %MyIntList, long 0, uint 1 |
Chris Lattner | ac2cbb8 | 2002-08-22 16:39:05 +0000 | [diff] [blame] | 24 | store int 12, int* %idx |
Chris Lattner | 784c52f | 2001-10-14 23:28:56 +0000 | [diff] [blame] | 25 | |
Chris Lattner | 230e5ef | 2001-10-15 03:11:58 +0000 | [diff] [blame] | 26 | %ack = load int * %0 ;; Load from the unnamed constant |
| 27 | %fzo = add int %ack, %blah |
| 28 | ret int %fzo |
Chris Lattner | 285c68d | 2001-10-13 07:15:38 +0000 | [diff] [blame] | 29 | end |
| 30 | |
Chris Lattner | 784c52f | 2001-10-14 23:28:56 +0000 | [diff] [blame] | 31 | declare void "unimp"(float, double) |
Chris Lattner | b4b07c7 | 2001-11-26 19:17:06 +0000 | [diff] [blame] | 32 | |
| 33 | internal void "testintern"() begin ret void end |
| 34 | void "Testintern"() begin ret void end |
| 35 | internal void "testIntern"() begin ret void end |
| 36 | |