1; ModuleID = 'test.c' 2source_filename = "test.c" 3target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 4target triple = "x86_64-unknown-linux-gnu" 5 6; RUN: opt -module-summary %s -o %t.bc 7; RUN: llvm-lto2 run -save-temps %t.bc -o %t.out \ 8; RUN: -r=%t.bc,foo,plx \ 9; RUN: -r=%t.bc,bar,pl 10 11; Check that we don't internalize `bar` during promotion, 12; because foo and bar are members of the same comdat 13; RUN: llvm-dis %t.out.1.1.promote.bc -o - | FileCheck %s 14 15; Thin LTO internalization shouldn't internalize `bar` as well 16; RUN: llvm-dis %t.out.1.2.internalize.bc -o - | FileCheck %s 17 18; CHECK: define linkonce_odr dso_local i32 @bar() comdat($foo) 19 20$foo = comdat any 21 22; Function Attrs: noinline nounwind optnone uwtable 23define linkonce_odr dso_local i32 @bar() comdat($foo) { 24entry: 25 ret i32 33 26} 27 28; Function Attrs: noinline nounwind optnone uwtable 29define linkonce_odr dso_local i32 @foo() comdat { 30entry: 31 %call = call i32 @bar() 32 %add = add nsw i32 42, %call 33 ret i32 %add 34} 35