1 ; RUN: llc -mtriple=thumbv7-windows-msvc -fast-isel %s -o - -start-before=stack-protector -stop-after=stack-protector | FileCheck %s
7 define void @caller1() sspreq {
8 ; CHECK-LABEL: define void @caller1()
11 ; CHECK: call void @__security_check_cookie
13 ; CHECK: musttail call void @callee()
14 ; CHECK-NEXT: ret void
15 %var = alloca [2 x i64]
16 store ptr %var, ptr @var
17 musttail call void @callee()
21 define void @justret() sspreq {
22 ; CHECK-LABEL: define void @justret()
24 ; CHECK: @llvm.stackguard
26 ; CHECK: call void @__security_check_cookie
29 %var = alloca [2 x i64]
30 store ptr %var, ptr @var
37 declare ptr @callee2()
39 define ptr @caller2() sspreq {
40 ; CHECK-LABEL: define ptr @caller2()
42 ; CHECK: @llvm.stackguard
44 ; CHECK: call void @__security_check_cookie
46 ; CHECK: [[TMP:%.*]] = musttail call ptr @callee2()
47 ; CHECK-NEXT: ret ptr [[TMP]]
49 %var = alloca [2 x i64]
50 store ptr %var, ptr @var
51 %tmp = musttail call ptr @callee2()
55 define void @caller3() sspreq {
56 ; CHECK-LABEL: define void @caller3()
59 ; CHECK: call void @__security_check_cookie
61 ; CHECK: tail call void @callee()
62 ; CHECK-NEXT: ret void
63 %var = alloca [2 x i64]
64 store ptr %var, ptr @var
65 tail call void @callee()
69 define ptr @caller4() sspreq {
70 ; CHECK-LABEL: define ptr @caller4()
72 ; CHECK: @llvm.stackguard
74 ; CHECK: call void @__security_check_cookie
76 ; CHECK: [[TMP:%.*]] = tail call ptr @callee2()
77 ; CHECK-NEXT: ret ptr [[TMP]]
79 %var = alloca [2 x i64]
80 store ptr %var, ptr @var
81 %tmp = tail call ptr @callee2()