1 ; RUN: split-file %s %t
2 ; RUN: opt -module-summary %t/a.s -o %t/a.bc
3 ; RUN: opt -module-summary %t/b.s -o %t/b.bc
4 ; RUN: llvm-nm %t/a.bc | FileCheck %s --check-prefix=NM
6 ; RUN: llvm-lto2 run %t/a.bc %t/b.bc -o %t/out -save-temps -r=%t/a.bc,ref,plx -r=%t/b.bc,ff_h264_cabac_tables,pl
7 ; RUN: llvm-dis < %t/out.2.2.internalize.bc | FileCheck %s
10 ;; IR symtab does not track inline asm symbols, so we don't know
11 ;; ff_h264_cabac_tables is undefined.
13 ; NM: ---------------- T ref
15 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
16 target triple = "x86_64-unknown-linux-gnu"
20 %0 = tail call ptr asm sideeffect "lea ff_h264_cabac_tables(%rip), $0", "=&r,~{dirflag},~{fpsr},~{flags}"()
25 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
26 target triple = "x86_64-unknown-linux-gnu"
28 ;; ff_h264_cabac_tables has __attribute__((used)) in the source code, which means
29 ;; its definition must be retained because there can be references the compiler
30 ;; cannot see (inline asm reference). Test we don't internalize it.
31 ; CHECK: @ff_h264_cabac_tables = dso_local constant [1 x i8] c"\09"
32 @ff_h264_cabac_tables = dso_local constant [1 x i8] c"\09"
34 @llvm.compiler.used = appending global [1 x ptr] [ptr @ff_h264_cabac_tables], section "llvm.metadata"