-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[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
Conversation
The assertions in llvm/test/CodeGen/X86/tailcc-ssp.ll were outdated. The initial comment indicated they were generated with `utils/update_llc_test_checks.py UTC_ARGS: --version 5`, but this was not accurate based on the file's content. Running `utils/update_llc_test_checks.py` regenerated the assertions, aligning them with the current `llc` output. This commit ensures that the test's claimed behavior accurately reflects the actual `llc` output, even though the tests were already passing.
@llvm/pr-subscribers-backend-x86 Author: Omair Javaid (omjavaid) ChangesThe assertions in llvm/test/CodeGen/X86/tailcc-ssp.ll were outdated. The initial comment indicated they were generated with Running This was identified by @efriedma-quic during review of #136290. Submitting a separate PR to make sure these changes stay isolated. Full diff: https://github.com/llvm/llvm-project/pull/143500.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/X86/tailcc-ssp.ll b/llvm/test/CodeGen/X86/tailcc-ssp.ll
index 5211e4fe9eef9..7ea5dd49f0242 100644
--- a/llvm/test/CodeGen/X86/tailcc-ssp.ll
+++ b/llvm/test/CodeGen/X86/tailcc-ssp.ll
@@ -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
@@ -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
@@ -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()
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…llvm#143500) The assertions in llvm/test/CodeGen/X86/tailcc-ssp.ll were outdated. The initial comment indicated they were generated with `utils/update_llc_test_checks.py UTC_ARGS: --version 5`, but this was not accurate based on the file's content. Running `utils/update_llc_test_checks.py` regenerated the assertions, aligning them with the current `llc` output. This commit ensures that the test's claimed behavior accurately reflects the actual `llc` output, even though the tests were already passing. This was identified by @efriedma-quic during review of llvm#136290. Submitting a separate PR to make sure these changes stay isolated.
…llvm#143500) The assertions in llvm/test/CodeGen/X86/tailcc-ssp.ll were outdated. The initial comment indicated they were generated with `utils/update_llc_test_checks.py UTC_ARGS: --version 5`, but this was not accurate based on the file's content. Running `utils/update_llc_test_checks.py` regenerated the assertions, aligning them with the current `llc` output. This commit ensures that the test's claimed behavior accurately reflects the actual `llc` output, even though the tests were already passing. This was identified by @efriedma-quic during review of llvm#136290. Submitting a separate PR to make sure these changes stay isolated.
The assertions in llvm/test/CodeGen/X86/tailcc-ssp.ll were outdated. The initial comment indicated they were generated with
utils/update_llc_test_checks.py UTC_ARGS: --version 5
, but this was not accurate based on the file's content.Running
utils/update_llc_test_checks.py
regenerated the assertions, aligning them with the currentllc
output.This commit ensures that the test's claimed behavior accurately reflects the actual
llc
output, even though the tests were already passing.This was identified by @efriedma-quic during review of #136290. Submitting a separate PR to make sure these changes stay isolated.