xref: /llvm-project/llvm/test/BugPoint/replace-funcs-with-null.ll (revision f75dd8b04c770e5818d304cff13b6ef0e50a9748)
1; Test that bugpoint can reduce the set of functions by replacing them with null.
2;
3; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc
4; REQUIRES: plugins
5
6@foo2 = alias i32 (), ptr @foo
7
8define i32 @foo() { ret i32 1 }
9
10define i32 @test() {
11	call i32 @test()
12	ret i32 %1
13}
14
15define i32 @bar() { ret i32 2 }
16
17@llvm.used = appending global [1 x ptr] [ptr @foo], section "llvm.metadata"
18