blob: 741cd8677a510b9deb4fca53899b2a1e5f30c00b [file] [log] [blame]
Martin Storsjo07589fc2018-03-20 20:37:51 +00001; RUN: llc -mtriple=x86_64-w64-mingw32 < %s -o - | FileCheck --check-prefix=MINGW %s
2; RUN: llc -mtriple=x86_64-pc-windows-itanium < %s -o - | FileCheck --check-prefix=MSVC %s
3; RUN: llc -mtriple=x86_64-pc-windows-msvc < %s -o - | FileCheck --check-prefix=MSVC %s
4
5declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
6declare dso_local void @other(i8*)
7declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
8
9define dso_local void @func() sspstrong {
10entry:
11; MINGW-LABEL: func:
12; MINGW: mov{{l|q}} __stack_chk_guard
13; MINGW: callq other
14; MINGW: mov{{l|q}} __stack_chk_guard
15; MINGW: callq __stack_chk_fail
16; MINGW: .seh_endproc
17
18; MSVC-LABEL: func:
19; MSVC: mov{{l|q}} __security_cookie
20; MSVC: callq other
21; MSVC: callq __security_check_cookie
22; MSVC: .seh_endproc
23
24 %c = alloca i8, align 1
25 call void @llvm.lifetime.start.p0i8(i64 1, i8* nonnull %c)
26 call void @other(i8* nonnull %c)
27 call void @llvm.lifetime.end.p0i8(i64 1, i8* nonnull %c)
28 ret void
29}