Run dead type elimination after dead argument elimination.
[oota-llvm.git] / test / BugPoint / remove_arguments_test.ll
1 ; RUN: bugpoint %s -output-prefix %t -bugpoint-crashcalls -silence-passes
2 ; RUN: llvm-dis remove_arguments_test.ll.tmp-reduced-simplified.bc -o - | FileCheck %s
3
4 ; Test to make sure that arguments are removed from the function if they are 
5 ; unnecessary. And clean up any types that that frees up too.
6
7 ; CHECK: target triple
8 ; CHECK-NOT: struct.anon
9 %struct.anon = type { i32 }
10
11 declare i32 @test2()
12
13 ; CHECK: define void @test() {
14 define i32 @test(i32 %A, %struct.anon* %B, float %C) {
15         call i32 @test2()
16         ret i32 %1
17 }