summaryrefslogtreecommitdiff
path: root/test/BugPoint/replace-funcs-with-null.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/BugPoint/replace-funcs-with-null.ll')
-rw-r--r--test/BugPoint/replace-funcs-with-null.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/BugPoint/replace-funcs-with-null.ll b/test/BugPoint/replace-funcs-with-null.ll
new file mode 100644
index 0000000000000..3433c456e90fe
--- /dev/null
+++ b/test/BugPoint/replace-funcs-with-null.ll
@@ -0,0 +1,17 @@
+; Test that bugpoint can reduce the set of functions by replacing them with null.
+;
+; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc
+; REQUIRES: loadable_module
+
+@foo2 = alias i32 ()* @foo
+
+define i32 @foo() { ret i32 1 }
+
+define i32 @test() {
+ call i32 @test()
+ ret i32 %1
+}
+
+define i32 @bar() { ret i32 2 }
+
+@llvm.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @foo to i8*)], section "llvm.metadata"