new testcase for static ctor list optimizations
authorChris Lattner <sabre@nondot.org>
Mon, 26 Sep 2005 01:42:03 +0000 (01:42 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 26 Sep 2005 01:42:03 +0000 (01:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23432 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/GlobalOpt/ctor-list-opt.ll [new file with mode: 0644]

diff --git a/test/Transforms/GlobalOpt/ctor-list-opt.ll b/test/Transforms/GlobalOpt/ctor-list-opt.ll
new file mode 100644 (file)
index 0000000..388f53d
--- /dev/null
@@ -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
+}
+