2007-01-17 02:08:22 +08: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
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
@somestr = constant [11x i8] c"hello world"
|
|
|
|
@array = constant [2 x i55] [ i55 12, i55 52 ]
|
2007-01-17 02:08:22 +08:00
|
|
|
constant { i55, i55 } { i55 4, i55 3 }
|
|
|
|
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define [2 x i55]* @testfunction(i55 %i0, i55 %j0)
|
2007-01-17 02:08:22 +08:00
|
|
|
begin
|
2007-01-26 16:25:06 +08:00
|
|
|
ret [2x i55]* @array
|
2007-01-17 02:08:22 +08:00
|
|
|
end
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define i8* @otherfunc(i55, double)
|
2007-01-17 02:08:22 +08:00
|
|
|
begin
|
2007-01-26 16:25:06 +08:00
|
|
|
%somestr = getelementptr [11x i8]* @somestr, i64 0, i64 0
|
2007-01-17 02:08:22 +08:00
|
|
|
ret i8* %somestr
|
|
|
|
end
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define i8* @yetanotherfunc(i55, double)
|
2007-01-17 02:08:22 +08:00
|
|
|
begin
|
|
|
|
ret i8* null ; Test null
|
|
|
|
end
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define i55 @negativeUnsigned() {
|
2007-01-17 02:08:22 +08:00
|
|
|
ret i55 -1
|
|
|
|
}
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define i55 @largeSigned() {
|
2007-01-17 02:08:22 +08:00
|
|
|
ret i55 3900000000
|
|
|
|
}
|