1 ; 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 ; RUN: llc -mtriple=i686-w64-mingw32 < %s -o - | FileCheck --check-prefix=MINGW %s
6 declare void @llvm.lifetime.start.p0(i64, ptr nocapture)
7 declare dso_local void @other(ptr)
8 declare void @llvm.lifetime.end.p0(i64, ptr nocapture)
10 define dso_local void @func() sspstrong {
13 ; MINGW: mov{{l|q}} .refptr.[[PREFIX:_?]]__stack_chk_guard{{(\(%rip\))?}}, [[REG:%[a-z]+]]
14 ; MINGW: mov{{l|q}} ([[REG]])
15 ; MINGW: call{{l|q}} [[PREFIX]]other
16 ; MINGW: mov{{l|q}} ([[REG]])
17 ; MINGW: call{{l|q}} [[PREFIX]]__stack_chk_fail
20 ; MSVC: mov{{l|q}} __security_cookie
22 ; MSVC: callq __security_check_cookie
25 %c = alloca i8, align 1
26 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c)
27 call void @other(ptr nonnull %c)
28 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c)