1 ; RUN: llvm-link %s %p/Inputs/comdat.ll -S -o - | FileCheck %s
2 target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
3 target triple = "i686-pc-windows-msvc"
6 @foo = global i32 42, comdat($foo)
8 define i32 @bar() comdat($foo) {
13 @qux = global i64 12, comdat($qux)
15 define i32 @baz() comdat($qux) {
20 @any = global i64 6, comdat($any)
22 ; CHECK: $qux = comdat largest
23 ; CHECK: $foo = comdat largest
24 ; CHECK: $any = comdat any
26 ; CHECK: @qux = global i64 12, comdat{{$}}
27 ; CHECK: @any = global i64 6, comdat{{$}}
28 ; CHECK: @foo = global i64 43, comdat{{$}}
29 ; CHECK-NOT: @in_unselected_group = global i32 13, comdat $qux
31 ; CHECK: define i32 @baz() comdat($qux)
32 ; CHECK: define i32 @bar() comdat($foo)