Home | History | Annotate | Download | only in Linker
      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"
      4 
      5 $foo = comdat largest
      6 @foo = global i32 42, comdat $foo
      7 
      8 define i32 @bar() comdat $foo {
      9   ret i32 42
     10 }
     11 
     12 $qux = comdat largest
     13 @qux = global i64 12, comdat $qux
     14 
     15 define i32 @baz() comdat $qux {
     16   ret i32 12
     17 }
     18 
     19 $any = comdat any
     20 @any = global i64 6, comdat $any
     21 
     22 ; CHECK: $qux = comdat largest
     23 ; CHECK: $foo = comdat largest
     24 ; CHECK: $any = comdat any
     25 
     26 ; CHECK: @qux = global i64 12, comdat $qux
     27 ; CHECK: @any = global i64 6, comdat $any
     28 ; CHECK: @foo = global i64 43, comdat $foo
     29 ; CHECK-NOT: @in_unselected_group = global i32 13, comdat $qux
     30 
     31 ; CHECK: define i32 @baz() comdat $qux
     32 ; CHECK: define i32 @bar() comdat $foo
     33