1 ; RUN: split-file %s %t
2 ; RUN: opt -module-summary %t/a.ll -o %ta.bc
3 ; RUN: opt -module-summary %t/b.ll -o %tb.bc
4 ; RUN: llvm-lto2 run %ta.bc %tb.bc -o %tc.bc -save-temps \
5 ; RUN: -r=%ta.bc,nossp_caller,px \
6 ; RUN: -r=%ta.bc,ssp_caller,px \
7 ; RUN: -r=%ta.bc,nossp_caller2,px \
8 ; RUN: -r=%ta.bc,ssp_caller2,px \
9 ; RUN: -r=%ta.bc,nossp_callee,x \
10 ; RUN: -r=%ta.bc,ssp_callee,x \
11 ; RUN: -r=%tb.bc,nossp_callee,px \
12 ; RUN: -r=%tb.bc,ssp_callee,px \
14 ; RUN: llvm-dis %tc.bc.1.4.opt.bc -o - | FileCheck %s
18 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
19 target triple = "x86_64-pc-linux-gnu"
21 declare void @nossp_callee()
22 declare void @ssp_callee() ssp
24 ; nossp caller should be able to inline nossp callee.
25 define void @nossp_caller() {
26 ; CHECK-LABEL: @nossp_caller
27 ; CHECK-NEXT: tail call void @foo
28 tail call void @nossp_callee()
32 ; ssp caller should be able to inline ssp callee.
33 define void @ssp_caller() ssp {
34 ; CHECK-LABEL: @ssp_caller
35 ; CHECK-NEXT: tail call void @foo
36 tail call void @ssp_callee()
40 ; nossp caller should *NOT* be able to inline ssp callee.
41 define void @nossp_caller2() {
42 ; CHECK-LABEL: @nossp_caller2
43 ; CHECK-NEXT: tail call void @ssp_callee
44 tail call void @ssp_callee()
48 ; ssp caller should *NOT* be able to inline nossp callee.
49 define void @ssp_caller2() ssp {
50 ; CHECK-LABEL: @ssp_caller2
51 ; CHECK-NEXT: tail call void @nossp_callee
52 tail call void @nossp_callee()
57 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
58 target triple = "x86_64-pc-linux-gnu"
62 define void @nossp_callee() {
67 define void @ssp_callee() ssp {