1 ; RUN: llc -mtriple=x86_64-windows-msvc %s -o - -verify-machineinstrs | FileCheck %s -check-prefix=WINDOWS
2 ; RUN: llc -mtriple=x86_64-linux-gnu %s -o - -verify-machineinstrs | FileCheck %s -check-prefix=LINUX
4 declare void @h(ptr, i64, ptr)
6 define tailcc void @tailcall_frame(ptr %0, i64 %1) sspreq {
7 ; WINDOWS-LABEL: tailcall_frame:
8 ; WINDOWS: callq __security_check_cookie
9 ; WINDOWS: xorl %ecx, %ecx
12 ; LINUX-LABEL: tailcall_frame:
15 ; LINUX: callq __stack_chk_fail
17 tail call tailcc void @h(ptr null, i64 0, ptr null)
22 define void @tailcall_unrelated_frame() sspreq {
23 ; WINDOWS-LABEL: tailcall_unrelated_frame:
24 ; WINDOWS: subq [[STACK:\$.*]], %rsp
26 ; WINDOWS: callq __security_check_cookie
27 ; WINDOWS: addq [[STACK]], %rsp
30 ; LINUX-LABEL: tailcall_unrelated_frame:
34 ; LINUX: callq __stack_chk_fail