1 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3 ; RUN: diff %t1.ll %t2.ll
5 %FunTy = type i32 (i32)
7 declare i32 @test(i32) ; Test forward declaration merging
9 define void @invoke(%FunTy* %x) {
10 %foo = call i32 %x( i32 123 ) ; <i32> [#uses=0]
11 %foo2 = tail call i32 %x( i32 123 ) ; <i32> [#uses=0]
15 define i32 @main(i32 %argc) {
16 %retval = call i32 @test( i32 %argc ) ; <i32> [#uses=2]
17 %two = add i32 %retval, %retval ; <i32> [#uses=1]
18 %retval2 = invoke i32 @test( i32 %argc )
19 to label %Next unwind label %Error ; <i32> [#uses=1]
22 %two2 = add i32 %two, %retval2 ; <i32> [#uses=1]
23 call void @invoke( %FunTy* @test )
30 define i32 @test(i32 %i0) {