diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-20 22:18:52 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-20 22:18:52 +0000 |
commit | e02b74e294132ae3b34eee2d91b46c830dc2b21b (patch) | |
tree | 4c88f8cfd6a7637723d955748add56b6766acc06 /llvm/test/LTO/Resolution | |
parent | 0c1c70aef4a1d97188fde20e894bafeccd64224c (diff) | |
download | bcm5719-llvm-e02b74e294132ae3b34eee2d91b46c830dc2b21b.tar.gz bcm5719-llvm-e02b74e294132ae3b34eee2d91b46c830dc2b21b.zip |
IPO, LTO: Plumb the summary from the LTO API into the pass manager.
Differential Revision: https://reviews.llvm.org/D28840
llvm-svn: 292661
Diffstat (limited to 'llvm/test/LTO/Resolution')
-rw-r--r-- | llvm/test/LTO/Resolution/X86/lowertypetests.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/LTO/Resolution/X86/lowertypetests.ll b/llvm/test/LTO/Resolution/X86/lowertypetests.ll new file mode 100644 index 00000000000..3753689a699 --- /dev/null +++ b/llvm/test/LTO/Resolution/X86/lowertypetests.ll @@ -0,0 +1,21 @@ +; RUN: opt -thinlto-bc -o %t %s +; RUN: llvm-lto2 -r %t,f,plx -r %t,foo,lx -r %t,foo,plx -o %t1 %t +; RUN: llvm-nm %t1.0 | FileCheck --check-prefix=MERGED %s +; RUN: llvm-nm %t1.1 | FileCheck %s + +; MERGED: R __typeid_foo_global_addr +; CHECK: U __typeid_foo_global_addr + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +@foo = global i32 0, !type !0 + +define i1 @f(i8* %ptr) { + %p = call i1 @llvm.type.test(i8* %ptr, metadata !"foo") + ret i1 %p +} + +declare i1 @llvm.type.test(i8* %ptr, metadata %typeid) nounwind readnone + +!0 = !{i32 0, !"foo"} |