brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 33d3906 Raw
35 lines · plain
1; RUN: split-file %s %t2; RUN: opt -module-summary %t/a.s -o %t/a.bc3; RUN: opt -module-summary %t/b.s -o %t/b.bc4; RUN: llvm-nm %t/a.bc | FileCheck %s --check-prefix=NM5 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,pl7; RUN: llvm-dis < %t/out.2.2.internalize.bc | FileCheck %s8 9;--- a.s10;; IR symtab does not track inline asm symbols, so we don't know11;; ff_h264_cabac_tables is undefined.12; NM-NOT: {{.}}13; NM:     ---------------- T ref14; NM-NOT: {{.}}15target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"16target triple = "x86_64-unknown-linux-gnu"17 18define ptr @ref() {19entry:20  %0 = tail call ptr asm sideeffect "lea ff_h264_cabac_tables(%rip), $0", "=&r,~{dirflag},~{fpsr},~{flags}"()21  ret ptr %022}23 24;--- b.s25target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"26target triple = "x86_64-unknown-linux-gnu"27 28;; ff_h264_cabac_tables has __attribute__((used)) in the source code, which means29;; its definition must be retained because there can be references the compiler30;; 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"33 34@llvm.compiler.used = appending global [1 x ptr] [ptr @ff_h264_cabac_tables], section "llvm.metadata"35