[AArch64] Fix bug in prolog clobbering live reg when shrink wrapping.
[oota-llvm.git] / test / Linker / comdat_group.ll
1 ; Ensure complete comdat group is materialized
2 ; RUN: llvm-link %s -S | FileCheck %s
3 ; CHECK: $linkoncecomdat = comdat any
4 ; CHECK: @linkoncecomdat = linkonce global i32 2
5 ; CHECK: @linkoncecomdat_unref_var = linkonce global i32 2, comdat($linkoncecomdat)
6 ; CHECK: define linkonce void @linkoncecomdat_unref_func() comdat($linkoncecomdat)
7
8 $linkoncecomdat = comdat any
9 @linkoncecomdat = linkonce global i32 2, comdat($linkoncecomdat)
10 @linkoncecomdat_unref_var = linkonce global i32 2, comdat($linkoncecomdat)
11 define linkonce void @linkoncecomdat_unref_func() comdat($linkoncecomdat) {
12   ret void
13 }
14 ; Reference one member of comdat so that comdat is generated.
15 define void @ref_linkoncecomdat() {
16   load i32, i32* @linkoncecomdat, align 4
17   ret void
18 }