Don' try to make sections in comdats SHF_MERGE.
[oota-llvm.git] / test / CodeGen / X86 / global-sections-comdat.ll
diff --git a/test/CodeGen/X86/global-sections-comdat.ll b/test/CodeGen/X86/global-sections-comdat.ll
new file mode 100644 (file)
index 0000000..a4804a7
--- /dev/null
@@ -0,0 +1,8 @@
+; RUN: llc < %s -mtriple=i386-unknown-linux | FileCheck %s -check-prefix=LINUX
+; RUN: llc < %s -mtriple=i386-unknown-linux -data-sections | FileCheck %s -check-prefix=LINUX-SECTIONS
+
+$G16 = comdat any
+@G16 = unnamed_addr constant i32 42, comdat
+
+; LINUX: .section      .rodata.G16,"aG",@progbits,G16,comdat
+; LINUX-SECTIONS: .section     .rodata.G16,"aG",@progbits,G16,comdat