2004-11-07 06:08:43 +00:00
|
|
|
; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
|
|
|
|
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
|
|
|
|
; RUN: diff %t1.ll %t2.ll
|
|
|
|
|
2001-09-10 07:58:01 +00:00
|
|
|
|
2001-09-18 04:38:50 +00:00
|
|
|
%MyVar = uninitialized global int
|
|
|
|
%MyIntList = uninitialized global { \2 *, int }
|
2002-10-06 22:32:38 +00:00
|
|
|
external global int ; int*:0
|
2001-09-18 04:38:50 +00:00
|
|
|
|
|
|
|
%AConst = constant int 123
|
2001-09-10 07:58:01 +00:00
|
|
|
|
2001-10-14 23:13:45 +00:00
|
|
|
%AString = constant [4 x ubyte] c"test"
|
|
|
|
|
2003-06-28 20:01:03 +00:00
|
|
|
%ZeroInit = global { [100 x int ], [40 x float ] } { [100 x int] zeroinitializer,
|
|
|
|
[40 x float] zeroinitializer }
|
|
|
|
|
2001-09-10 07:58:01 +00:00
|
|
|
implementation
|
|
|
|
|
|
|
|
int "foo"(int %blah)
|
|
|
|
begin
|
|
|
|
store int 5, int *%MyVar
|
2002-10-06 22:32:38 +00:00
|
|
|
%idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1
|
2002-08-22 16:04:03 +00:00
|
|
|
store int 12, int* %idx
|
2001-10-14 23:13:45 +00:00
|
|
|
ret int %blah
|
2001-09-10 07:58:01 +00:00
|
|
|
end
|
|
|
|
|