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