summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-26 01:42:03 +0000
committerChris Lattner <sabre@nondot.org>2005-09-26 01:42:03 +0000
commit09eec56af0a51a9381241375744e856dcca39d72 (patch)
tree94c8b1776fe97a7e8b3429d11f13e282af27740c /test
parenta48283baa314c076f270e4d3da9d283599255402 (diff)
downloadllvm-09eec56af0a51a9381241375744e856dcca39d72.tar.gz
llvm-09eec56af0a51a9381241375744e856dcca39d72.tar.bz2
llvm-09eec56af0a51a9381241375744e856dcca39d72.tar.xz
new testcase for static ctor list optimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/GlobalOpt/ctor-list-opt.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/ctor-list-opt.ll b/test/Transforms/GlobalOpt/ctor-list-opt.ll
new file mode 100644
index 0000000000..388f53d4f6
--- /dev/null
+++ b/test/Transforms/GlobalOpt/ctor-list-opt.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -globalopt -disable-output &&
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep CTOR
+
+%llvm.global_ctors = appending global [2 x { int, void ()* }] [
+ { int, void ()* } { int 65535, void ()* %CTOR1 },
+ { int, void ()* } { int 65535, void ()* %CTOR1 }
+]
+
+implementation
+
+internal void %CTOR1() { ;; noop ctor, remove.
+ ret void
+}
+