JF Bastien | 7b862ec | 2015-04-20 23:42:22 +0000 | [diff] [blame] | 1 | ; Test that bugpoint can reduce the set of functions by replacing them with null. |
| 2 | ; |
Brian Gesiak | dcf592e | 2018-12-10 00:56:13 +0000 | [diff] [blame] | 3 | ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc |
JF Bastien | 7b862ec | 2015-04-20 23:42:22 +0000 | [diff] [blame] | 4 | ; REQUIRES: loadable_module |
| 5 | |
David Blaikie | 21f77df | 2015-09-11 03:22:04 +0000 | [diff] [blame] | 6 | @foo2 = alias i32 (), i32 ()* @foo |
JF Bastien | 7b862ec | 2015-04-20 23:42:22 +0000 | [diff] [blame] | 7 | |
| 8 | define i32 @foo() { ret i32 1 } |
| 9 | |
| 10 | define i32 @test() { |
| 11 | call i32 @test() |
| 12 | ret i32 %1 |
| 13 | } |
| 14 | |
| 15 | define i32 @bar() { ret i32 2 } |
| 16 | |
| 17 | @llvm.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @foo to i8*)], section "llvm.metadata" |