aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/GlobalDCE/2002-09-12-Redeletion.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/GlobalDCE/2002-09-12-Redeletion.ll b/test/Transforms/GlobalDCE/2002-09-12-Redeletion.ll
new file mode 100644
index 0000000..b6e9b69
--- /dev/null
+++ b/test/Transforms/GlobalDCE/2002-09-12-Redeletion.ll
@@ -0,0 +1,13 @@
+; RUN: as < %s | opt -globaldce
+
+%foo = internal global int 7 ;; Should die when function %foo is killed
+
+%bar = internal global [2x { int *, int }] [ { int *, int } { int* %foo, int 7}, {int*, int} { int* %foo, int 1 }]
+
+implementation
+
+internal int %foo() { ;; dies when %b dies.
+ %ret = load int* %foo
+ ret int %ret
+}
+