2007-01-16 18:08:22 +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
|
|
|
|
|
|
|
|
%FunTy = type i31(i31)
|
|
|
|
|
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
define void @"invoke"(%FunTy *%x)
|
2007-01-16 18:08:22 +00:00
|
|
|
begin
|
|
|
|
%foo = call %FunTy* %x(i31 123)
|
|
|
|
ret void
|
|
|
|
end
|
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
define i31 @"main"(i31 %argc, i8 **%argv, i8 **%envp)
|
2007-01-16 18:08:22 +00:00
|
|
|
begin
|
2007-01-26 08:25:06 +00:00
|
|
|
%retval = call i31 (i31) *@test(i31 %argc)
|
2007-01-16 18:08:22 +00:00
|
|
|
%two = add i31 %retval, %retval
|
2007-01-26 08:25:06 +00:00
|
|
|
%retval2 = call i31 @test(i31 %argc)
|
2007-01-16 18:08:22 +00:00
|
|
|
|
|
|
|
%two2 = add i31 %two, %retval2
|
2007-01-26 08:25:06 +00:00
|
|
|
call void @invoke (%FunTy* @test)
|
2007-01-16 18:08:22 +00:00
|
|
|
ret i31 %two2
|
|
|
|
end
|
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
define i31 @"test"(i31 %i0)
|
2007-01-16 18:08:22 +00:00
|
|
|
begin
|
|
|
|
ret i31 %i0
|
|
|
|
end
|