For PR411:
[oota-llvm.git] / test / Integer / calltest_bt.ll
1 ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3 ; RUN: diff %t1.ll %t2.ll
4
5 %FunTy = type i28(i28)
6
7 declare i28 @"test"(...)   ; Test differences of prototype
8
9 implementation
10
11 define void @"invoke"(%FunTy *%x) {
12         %foo = call %FunTy* %x(i28 123)
13         %foo2 = tail call %FunTy* %x(i28 123)
14         ret void
15 }
16
17 define i28 @"main"(i28 %argc)   ; TODO: , sbyte **argv, sbyte **envp)
18 begin
19         %retval = call i28 (i28) *@test2(i28 %argc)
20         %two    = add i28 %retval, %retval
21         %retval2 = invoke i28 @test2(i28 %argc)
22                    to label %Next unwind label %Error
23 Next:
24         %two2 = add i28 %two, %retval2
25         call void @invoke (%FunTy* @test2)
26         ret i28 %two2
27 Error:
28         ret i28 -1
29 end
30
31 define i28 @"test2"(i28 %i0) {
32     ret i28 %i0
33 }