Daniel Dunbar | e0ae2b2 | 2009-09-07 19:26:18 +0000 | [diff] [blame] | 1 | ; RUN: bugpoint %s -output-prefix %t -bugpoint-crashcalls -silence-passes |
Dan Gohman | b953974 | 2010-06-07 20:20:33 +0000 | [diff] [blame] | 2 | ; RUN: llvm-dis remove_arguments_test.ll.tmp-reduced-simplified.bc -o - | FileCheck %s |
Chris Lattner | 484147d | 2003-06-24 23:40:27 +0000 | [diff] [blame] | 3 | |
Reid Spencer | 660c4f9 | 2007-03-19 18:08:42 +0000 | [diff] [blame] | 4 | ; 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^] | 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 } |
Chris Lattner | 484147d | 2003-06-24 23:40:27 +0000 | [diff] [blame] | 10 | |
Reid Spencer | 660c4f9 | 2007-03-19 18:08:42 +0000 | [diff] [blame] | 11 | declare i32 @test2() |
| 12 | |
Dan Gohman | b953974 | 2010-06-07 20:20:33 +0000 | [diff] [blame] | 13 | ; CHECK: define void @test() { |
Dan Gohman | d0a6a8c | 2010-06-07 20:28:37 +0000 | [diff] [blame^] | 14 | define i32 @test(i32 %A, %struct.anon* %B, float %C) { |
Reid Spencer | 660c4f9 | 2007-03-19 18:08:42 +0000 | [diff] [blame] | 15 | call i32 @test2() |
| 16 | ret i32 %1 |
Chris Lattner | 484147d | 2003-06-24 23:40:27 +0000 | [diff] [blame] | 17 | } |