blob: 791ec69a23d2fa9520054d80c57f00b1c28ad6fa [file] [log] [blame]
Rafael Espindola3cb96262010-08-07 21:48:09 +00001; FIXME: This likely fails on windows
Rafael Espindolaa5c4cc52010-08-08 00:55:59 +00002; RUN: bugpoint -load %llvmlibsdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
Dan Gohman4d541e42010-06-07 20:58:11 +00003; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
Rafael Espindola9778a8a2010-08-09 15:14:06 +00004; XFAIL: mingw
Chris Lattner484147d2003-06-24 23:40:27 +00005
Reid Spencer660c4f92007-03-19 18:08:42 +00006; Test to make sure that arguments are removed from the function if they are
Dan Gohmand0a6a8c2010-06-07 20:28:37 +00007; unnecessary. And clean up any types that that frees up too.
8
9; CHECK: target triple
10; CHECK-NOT: struct.anon
11%struct.anon = type { i32 }
Chris Lattner484147d2003-06-24 23:40:27 +000012
Reid Spencer660c4f92007-03-19 18:08:42 +000013declare i32 @test2()
14
Dan Gohmanb9539742010-06-07 20:20:33 +000015; CHECK: define void @test() {
Dan Gohmand0a6a8c2010-06-07 20:28:37 +000016define i32 @test(i32 %A, %struct.anon* %B, float %C) {
Reid Spencer660c4f92007-03-19 18:08:42 +000017 call i32 @test2()
18 ret i32 %1
Chris Lattner484147d2003-06-24 23:40:27 +000019}