blob: 29a03b83107760e5c00629d3387b9f5036a87cb7 [file] [log] [blame]
NAKAMURA Takumi86c817e2010-11-29 07:58:32 +00001; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
Dan Gohman4d541e42010-06-07 20:58:11 +00002; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
NAKAMURA Takumi86c817e2010-11-29 07:58:32 +00003; REQUIRES: loadable_module
Chris Lattner484147d2003-06-24 23:40:27 +00004
Reid Spencer660c4f92007-03-19 18:08:42 +00005; Test to make sure that arguments are removed from the function if they are
Dan Gohmand0a6a8c2010-06-07 20:28:37 +00006; unnecessary. And clean up any types that that frees up too.
7
8; CHECK: target triple
9; CHECK-NOT: struct.anon
10%struct.anon = type { i32 }
Chris Lattner484147d2003-06-24 23:40:27 +000011
Reid Spencer660c4f92007-03-19 18:08:42 +000012declare i32 @test2()
13
Dan Gohmanb9539742010-06-07 20:20:33 +000014; CHECK: define void @test() {
Dan Gohmand0a6a8c2010-06-07 20:28:37 +000015define i32 @test(i32 %A, %struct.anon* %B, float %C) {
Reid Spencer660c4f92007-03-19 18:08:42 +000016 call i32 @test2()
17 ret i32 %1
Chris Lattner484147d2003-06-24 23:40:27 +000018}