summaryrefslogtreecommitdiff
path: root/test/BugPoint/replace-funcs-with-null.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
commit5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch)
treea6140557876943cdd800ee997c9317283394b22c /test/BugPoint/replace-funcs-with-null.ll
parentf03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff)
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"