[LTO] Add a test for ThinLTO + --defsym.
We also get this right since r307303. llvm-svn: 307412
This commit is contained in:
parent
cb07d67a5c
commit
6687318bab
|
@ -1,9 +1,16 @@
|
|||
; REQUIRES: x86
|
||||
; LTO
|
||||
; RUN: llvm-as %s -o %t.o
|
||||
; RUN: llvm-as %S/Inputs/defsym-bar.ll -o %t1.o
|
||||
; RUN: ld.lld %t.o %t1.o -shared -o %t.so -defsym=bar2=bar3
|
||||
; RUN: llvm-objdump -d %t.so | FileCheck %s
|
||||
|
||||
; ThinLTO
|
||||
; RUN: opt -module-summary %s -o %t.o
|
||||
; RUN: opt -module-summary %S/Inputs/defsym-bar.ll -o %t1.o
|
||||
; RUN: ld.lld %t.o %t1.o -shared -o %t.so -defsym=bar2=bar3
|
||||
; RUN: llvm-objdump -d %t.so | FileCheck %s --check-prefix=THIN
|
||||
|
||||
; Call to bar2() should not be inlined and should be routed to bar3()
|
||||
; Symbol bar3 should not be eliminated
|
||||
|
||||
|
@ -13,6 +20,13 @@
|
|||
; CHECK-NEXT: callq{{.*}}<bar3>
|
||||
; CHECK-NEXT: callq
|
||||
|
||||
; THIN: foo
|
||||
; THIN-NEXT: pushq %rax
|
||||
; THIN-NEXT: callq
|
||||
; THIN-NEXT: callq{{.*}}<bar3>
|
||||
; THIN-NEXT: popq %rax
|
||||
; THIN-NEXT: jmp
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
|
|
Loading…
Reference in New Issue