Skip to content

[X86] Update tailcc-ssp.ll assertions using update_llc_test_checks.py #143500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 43 additions & 12 deletions llvm/test/CodeGen/X86/tailcc-ssp.ll
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ define void @tailcall_unrelated_frame() sspreq {
; WINDOWS-NEXT: callq __security_check_cookie
; WINDOWS-NEXT: int3
; WINDOWS-NEXT: .seh_endproc

;
; LINUX-LABEL: tailcall_unrelated_frame:
; LINUX: # %bb.0:
; LINUX-NEXT: pushq %rax
Expand All @@ -97,6 +97,7 @@ define void @tailcall_unrelated_frame() sspreq {
; LINUX-NEXT: .cfi_def_cfa_offset 16
; LINUX-NEXT: callq __stack_chk_fail@PLT


call void @bar()
tail call void @bar()
ret void
Expand All @@ -105,18 +106,48 @@ define void @tailcall_unrelated_frame() sspreq {
declare void @callee()
define void @caller() sspreq {
; WINDOWS-LABEL: caller:
; WINDOWS: callq callee
; WINDOWS: callq callee
; WINDOWS: cmpq __security_cookie(%rip), %rcx
; WINDOWS: jne
; WINDOWS: callq __security_check_cookie

; WINDOWS: # %bb.0:
; WINDOWS-NEXT: subq $40, %rsp
; WINDOWS-NEXT: .seh_stackalloc 40
; WINDOWS-NEXT: .seh_endprologue
; WINDOWS-NEXT: movq __security_cookie(%rip), %rax
; WINDOWS-NEXT: xorq %rsp, %rax
; WINDOWS-NEXT: movq %rax, {{[0-9]+}}(%rsp)
; WINDOWS-NEXT: callq callee
; WINDOWS-NEXT: callq callee
; WINDOWS-NEXT: movq {{[0-9]+}}(%rsp), %rcx
; WINDOWS-NEXT: xorq %rsp, %rcx
; WINDOWS-NEXT: cmpq __security_cookie(%rip), %rcx
; WINDOWS-NEXT: jne .LBB2_2
; WINDOWS-NEXT: # %bb.1:
; WINDOWS-NEXT: .seh_startepilogue
; WINDOWS-NEXT: addq $40, %rsp
; WINDOWS-NEXT: .seh_endepilogue
; WINDOWS-NEXT: retq
; WINDOWS-NEXT: .LBB2_2:
; WINDOWS-NEXT: callq __security_check_cookie
; WINDOWS-NEXT: int3
; WINDOWS-NEXT: .seh_endproc
;
; LINUX-LABEL: caller:
; LINUX: callq callee@PLT
; LINUX: callq callee@PLT
; LINUX: cmpq
; LINUX: jne
; LINUX: callq __stack_chk_fail@PLT
; LINUX: # %bb.0:
; LINUX-NEXT: pushq %rax
; LINUX-NEXT: .cfi_def_cfa_offset 16
; LINUX-NEXT: movq %fs:40, %rax
; LINUX-NEXT: movq %rax, (%rsp)
; LINUX-NEXT: callq callee@PLT
; LINUX-NEXT: callq callee@PLT
; LINUX-NEXT: movq %fs:40, %rax
; LINUX-NEXT: cmpq (%rsp), %rax
; LINUX-NEXT: jne .LBB2_2
; LINUX-NEXT: # %bb.1: # %SP_return
; LINUX-NEXT: popq %rax
; LINUX-NEXT: .cfi_def_cfa_offset 8
; LINUX-NEXT: retq
; LINUX-NEXT: .LBB2_2: # %CallStackCheckFailBlk
; LINUX-NEXT: .cfi_def_cfa_offset 16
; LINUX-NEXT: callq __stack_chk_fail@PLT


tail call void @callee()
call void @callee()
Expand Down
Loading