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: define void @nossp_caller()
28 ; CHECK-NEXT: tail call void @foo
29 tail call void @nossp_callee()
33 ; ssp caller should be able to inline ssp callee.
34 define void @ssp_caller() ssp {
35 ; CHECK-LABEL: define void @ssp_caller()
37 ; CHECK-NEXT: tail call void @foo
38 tail call void @ssp_callee()
42 ; nossp caller should be able to inline ssp callee.
43 ; the ssp attribute is not propagated.
44 define void @nossp_caller2() {
45 ; CHECK-LABEL: define void @nossp_caller2()
47 ; CHECK-NEXT: tail call void @foo
48 tail call void @ssp_callee()
52 ; ssp caller should be able to inline nossp callee.
53 define void @ssp_caller2() ssp {
54 ; CHECK-LABEL: define void @ssp_caller2()
56 ; CHECK-NEXT: tail call void @foo
57 tail call void @nossp_callee()
61 ; CHECK: attributes #0 = { ssp }
64 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
65 target triple = "x86_64-pc-linux-gnu"
69 define void @nossp_callee() {
74 define void @ssp_callee() ssp {