aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/GlobalDCE/2002-07-17-ConstantRef.ll12
-rw-r--r--test/Transforms/GlobalDCE/Makefile10
2 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/GlobalDCE/2002-07-17-ConstantRef.ll b/test/Transforms/GlobalDCE/2002-07-17-ConstantRef.ll
new file mode 100644
index 0000000000..e7830f5ba1
--- /dev/null
+++ b/test/Transforms/GlobalDCE/2002-07-17-ConstantRef.ll
@@ -0,0 +1,12 @@
+; RUN: as < %s | opt -globaldce
+;
+%X = global void() * %func
+implementation
+
+internal void %func() { ; Not dead, can be reachable via X
+ ret void
+}
+
+void %main() {
+ ret void
+}
diff --git a/test/Transforms/GlobalDCE/Makefile b/test/Transforms/GlobalDCE/Makefile
new file mode 100644
index 0000000000..91acd4d481
--- /dev/null
+++ b/test/Transforms/GlobalDCE/Makefile
@@ -0,0 +1,10 @@
+
+LEVEL = ../../../..
+include $(LEVEL)/test/Makefile.tests
+
+TESTS := $(wildcard *.ll)
+
+all:: $(addprefix Output/, $(TESTS:%.ll=%.ll.out))
+
+Output/%.ll.out: %.ll Output/.dir $(LOPT)
+ -$(TESTRUNR) $<