diff options
-rw-r--r-- | llvm/test/tools/gold/X86/Inputs/comdat2.ll | 9 | ||||
-rw-r--r-- | llvm/test/tools/gold/X86/comdat2.ll | 19 |
2 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/tools/gold/X86/Inputs/comdat2.ll b/llvm/test/tools/gold/X86/Inputs/comdat2.ll new file mode 100644 index 00000000000..5b7f74cf0b2 --- /dev/null +++ b/llvm/test/tools/gold/X86/Inputs/comdat2.ll @@ -0,0 +1,9 @@ +$foo = comdat any +@foo = global i8 1, comdat +define void @zed() { + call void @bar() + ret void +} +define void @bar() comdat($foo) { + ret void +} diff --git a/llvm/test/tools/gold/X86/comdat2.ll b/llvm/test/tools/gold/X86/comdat2.ll new file mode 100644 index 00000000000..2156efd207b --- /dev/null +++ b/llvm/test/tools/gold/X86/comdat2.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as %s -o %t.bc +; RUN: llvm-as %p/Inputs/comdat2.ll -o %t2.bc +; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ +; RUN: --plugin-opt=emit-llvm \ +; RUN: -shared %t.bc %t2.bc -o %t3.bc +; RUN: llvm-dis %t3.bc -o - | FileCheck %s + + +$foo = comdat any +@foo = global i8 0, comdat + +; CHECK: @foo = global i8 0, comdat + +; CHECK: define void @zed() { +; CHECK: call void @bar() +; CHECK: ret void +; CHECK: } + +; CHECK: declare void @bar() |