summaryrefslogtreecommitdiffstats
path: root/test/Transforms/GlobalDCE/pr20981.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/GlobalDCE/pr20981.ll')
-rw-r--r--test/Transforms/GlobalDCE/pr20981.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/GlobalDCE/pr20981.ll b/test/Transforms/GlobalDCE/pr20981.ll
new file mode 100644
index 0000000..92d2840
--- /dev/null
+++ b/test/Transforms/GlobalDCE/pr20981.ll
@@ -0,0 +1,17 @@
+; RUN: opt < %s -globaldce -S | FileCheck %s
+
+$c1 = comdat any
+; CHECK: $c1 = comdat any
+
+@a1 = linkonce_odr alias void ()* @f1
+; CHECK: @a1 = linkonce_odr alias void ()* @f1
+
+define linkonce_odr void @f1() comdat $c1 {
+ ret void
+}
+; CHECK: define linkonce_odr void @f1() comdat $c1
+
+define void @g() {
+ call void @f1()
+ ret void
+}