NAKAMURA Takumi | 86c817e | 2010-11-29 07:58:32 +0000 | [diff] [blame^] | 1 | ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes |
Dan Gohman | 4d541e4 | 2010-06-07 20:58:11 +0000 | [diff] [blame] | 2 | ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s |
NAKAMURA Takumi | 86c817e | 2010-11-29 07:58:32 +0000 | [diff] [blame^] | 3 | ; REQUIRES: loadable_module |
Chris Lattner | 484147d | 2003-06-24 23:40:27 +0000 | [diff] [blame] | 4 | |
Reid Spencer | 660c4f9 | 2007-03-19 18:08:42 +0000 | [diff] [blame] | 5 | ; Test to make sure that arguments are removed from the function if they are |
Dan Gohman | d0a6a8c | 2010-06-07 20:28:37 +0000 | [diff] [blame] | 6 | ; 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 Lattner | 484147d | 2003-06-24 23:40:27 +0000 | [diff] [blame] | 11 | |
Reid Spencer | 660c4f9 | 2007-03-19 18:08:42 +0000 | [diff] [blame] | 12 | declare i32 @test2() |
| 13 | |
Dan Gohman | b953974 | 2010-06-07 20:20:33 +0000 | [diff] [blame] | 14 | ; CHECK: define void @test() { |
Dan Gohman | d0a6a8c | 2010-06-07 20:28:37 +0000 | [diff] [blame] | 15 | define i32 @test(i32 %A, %struct.anon* %B, float %C) { |
Reid Spencer | 660c4f9 | 2007-03-19 18:08:42 +0000 | [diff] [blame] | 16 | call i32 @test2() |
| 17 | ret i32 %1 |
Chris Lattner | 484147d | 2003-06-24 23:40:27 +0000 | [diff] [blame] | 18 | } |