[llvm] 9298e40 - [X86] tailcc-ssp.ll - regenerate test checks to simplify diff for #95904
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 04:37:02 PDT 2024
Author: Simon Pilgrim
Date: 2024-06-24T12:36:47+01:00
New Revision: 9298e40f46e07bb348e310236c1b2f0359a224dc
URL: https://github.com/llvm/llvm-project/commit/9298e40f46e07bb348e310236c1b2f0359a224dc
DIFF: https://github.com/llvm/llvm-project/commit/9298e40f46e07bb348e310236c1b2f0359a224dc.diff
LOG: [X86] tailcc-ssp.ll - regenerate test checks to simplify diff for #95904
Added:
Modified:
llvm/test/CodeGen/X86/tailcc-ssp.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/tailcc-ssp.ll b/llvm/test/CodeGen/X86/tailcc-ssp.ll
index bb9b4429c0761..012c8aa5d969c 100644
--- a/llvm/test/CodeGen/X86/tailcc-ssp.ll
+++ b/llvm/test/CodeGen/X86/tailcc-ssp.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=x86_64-windows-msvc %s -o - -verify-machineinstrs | FileCheck %s -check-prefix=WINDOWS
; RUN: llc -mtriple=x86_64-linux-gnu %s -o - -verify-machineinstrs | FileCheck %s -check-prefix=LINUX
@@ -5,15 +6,42 @@ declare void @h(ptr, i64, ptr)
define tailcc void @tailcall_frame(ptr %0, i64 %1) sspreq {
; WINDOWS-LABEL: tailcall_frame:
-; WINDOWS: callq __security_check_cookie
-; WINDOWS: xorl %ecx, %ecx
-; WINDOWS: jmp h
-
+; WINDOWS: # %bb.0:
+; WINDOWS-NEXT: subq $56, %rsp
+; WINDOWS-NEXT: .seh_stackalloc 56
+; 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: movq {{[0-9]+}}(%rsp), %rcx
+; WINDOWS-NEXT: xorq %rsp, %rcx
+; WINDOWS-NEXT: callq __security_check_cookie
+; WINDOWS-NEXT: xorl %ecx, %ecx
+; WINDOWS-NEXT: xorl %edx, %edx
+; WINDOWS-NEXT: xorl %r8d, %r8d
+; WINDOWS-NEXT: addq $56, %rsp
+; WINDOWS-NEXT: jmp h # TAILCALL
+; WINDOWS-NEXT: .seh_endproc
+;
; LINUX-LABEL: tailcall_frame:
-; LINUX: jne
-; LINUX: jmp h
-; LINUX: callq __stack_chk_fail
-
+; LINUX: # %bb.0:
+; LINUX-NEXT: subq $24, %rsp
+; LINUX-NEXT: .cfi_def_cfa_offset 32
+; LINUX-NEXT: movq %fs:40, %rax
+; LINUX-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; LINUX-NEXT: movq %fs:40, %rax
+; LINUX-NEXT: cmpq {{[0-9]+}}(%rsp), %rax
+; LINUX-NEXT: jne .LBB0_2
+; LINUX-NEXT: # %bb.1: # %SP_return
+; LINUX-NEXT: xorl %edi, %edi
+; LINUX-NEXT: xorl %esi, %esi
+; LINUX-NEXT: xorl %edx, %edx
+; LINUX-NEXT: addq $24, %rsp
+; LINUX-NEXT: .cfi_def_cfa_offset 8
+; LINUX-NEXT: jmp h at PLT # TAILCALL
+; LINUX-NEXT: .LBB0_2: # %CallStackCheckFailBlk
+; LINUX-NEXT: .cfi_def_cfa_offset 32
+; LINUX-NEXT: callq __stack_chk_fail at PLT
tail call tailcc void @h(ptr null, i64 0, ptr null)
ret void
}
@@ -21,18 +49,39 @@ define tailcc void @tailcall_frame(ptr %0, i64 %1) sspreq {
declare void @bar()
define void @tailcall_unrelated_frame() sspreq {
; WINDOWS-LABEL: tailcall_unrelated_frame:
-; WINDOWS: subq [[STACK:\$.*]], %rsp
-; WINDOWS: callq bar
-; WINDOWS: callq __security_check_cookie
-; WINDOWS: addq [[STACK]], %rsp
-; WINDOWS: jmp bar
-
+; 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 bar
+; WINDOWS-NEXT: movq {{[0-9]+}}(%rsp), %rcx
+; WINDOWS-NEXT: xorq %rsp, %rcx
+; WINDOWS-NEXT: callq __security_check_cookie
+; WINDOWS-NEXT: nop
+; WINDOWS-NEXT: addq $40, %rsp
+; WINDOWS-NEXT: jmp bar # TAILCALL
+; WINDOWS-NEXT: .seh_endproc
+;
; LINUX-LABEL: tailcall_unrelated_frame:
-; LINUX: callq bar
-; LINUX: jne
-; LINUX: jmp bar
-; LINUX: callq __stack_chk_fail
-
+; 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 bar at PLT
+; LINUX-NEXT: movq %fs:40, %rax
+; LINUX-NEXT: cmpq (%rsp), %rax
+; LINUX-NEXT: jne .LBB1_2
+; LINUX-NEXT: # %bb.1: # %SP_return
+; LINUX-NEXT: popq %rax
+; LINUX-NEXT: .cfi_def_cfa_offset 8
+; LINUX-NEXT: jmp bar at PLT # TAILCALL
+; LINUX-NEXT: .LBB1_2: # %CallStackCheckFailBlk
+; LINUX-NEXT: .cfi_def_cfa_offset 16
+; LINUX-NEXT: callq __stack_chk_fail at PLT
call void @bar()
tail call void @bar()
ret void
More information about the llvm-commits
mailing list