1 // REQUIRES: x86-registered-target
3 // RUN: split-file %s %t
4 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -flto=thin -emit-llvm-bc %t/a.c -o %t/a.bc
5 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -flto=thin -emit-llvm-bc %t/b.c -o %t/b.bc
6 // RUN: llvm-nm %t/a.bc | FileCheck %s --check-prefix=NM
8 // 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
9 // RUN: llvm-dis < %t/out.2.2.internalize.bc | FileCheck %s
12 /// IR symtab does not track inline asm symbols, so we don't know
13 /// ff_h264_cabac_tables is undefined.
15 // NM: ---------------- T ref
17 const char *ref(void) {
19 asm("lea ff_h264_cabac_tables(%%rip), %0" : "=r"(ret
));
24 /// ff_h264_cabac_tables has __attribute__((used)) in the source code, which means
25 /// its definition must be retained because there can be references the compiler
26 /// cannot see (inline asm reference). Test we don't internalize it.
27 // CHECK: @ff_h264_cabac_tables = dso_local constant [1 x i8] c"\09"
29 const char ff_h264_cabac_tables
[1] = "\x09";