1 ; RUN: llc -mtriple=thumbv7-windows-msvc -fast-isel %s -o - -start-before=stack-protector -stop-after=stack-protector | FileCheck %s
3 @var = global [2 x i64]* null
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 [2 x i64]* %var, [2 x i64]** @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 [2 x i64]* %var, [2 x i64]** @var
38 declare i64* @callee2()
40 define i8* @caller2() sspreq {
41 ; CHECK-LABEL: define i8* @caller2()
43 ; CHECK: @llvm.stackguard
45 ; CHECK: call void @__security_check_cookie
47 ; CHECK: [[TMP:%.*]] = musttail call i64* @callee2()
48 ; CHECK-NEXT: [[RES:%.*]] = bitcast i64* [[TMP]] to i8*
49 ; CHECK-NEXT: ret i8* [[RES]]
51 %var = alloca [2 x i64]
52 store [2 x i64]* %var, [2 x i64]** @var
53 %tmp = musttail call i64* @callee2()
54 %res = bitcast i64* %tmp to i8*