summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-26 20:50:07 +0000
committerChris Lattner <sabre@nondot.org>2001-11-26 20:50:07 +0000
commit475aee944d61e30b7fe377c2852df810364d1191 (patch)
tree0cd38743ec8c9aca553473f9b3268e52aa504353 /test
parent2409ddb5b2f79f0430bbc718805ab59a9f1f8da3 (diff)
downloadllvm-475aee944d61e30b7fe377c2852df810364d1191.tar.gz
llvm-475aee944d61e30b7fe377c2852df810364d1191.tar.bz2
llvm-475aee944d61e30b7fe377c2852df810364d1191.tar.xz
New testcase for globaldce
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/globaldce.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/globaldce.ll b/test/globaldce.ll
new file mode 100644
index 0000000000..cddb5fe14d
--- /dev/null
+++ b/test/globaldce.ll
@@ -0,0 +1,17 @@
+%var = internal global int 1234 ;; used by dead method
+
+implementation
+
+internal int "deadfunc"()
+begin
+ %val = load int * %var
+ %val2 = call int %deadfunc()
+ %val3 = add int %val, %val2
+ ret int %val3
+end
+
+int "main"(int %argc) ; TODO: , sbyte **argv, sbyte **envp)
+begin
+ ret int -1
+end
+