[clang] [llvm] security check cookie execute only when needed (PR #95904)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 10:42:53 PDT 2024


================
@@ -97,9 +102,13 @@ define void @test_vla(i32 %n) nounwind ssp {
 ; MSVC-X64: callq escape
 ; MSVC-X64: movq [[SLOT]](%rbp), %rcx
 ; MSVC-X64: xorq %rbp, %rcx
-; MSVC-X64: callq __security_check_cookie
+; MSVC-X64:	movq	__security_cookie(%rip), %rax
----------------
efriedma-quic wrote:

Can we avoid loading the cookie into a register?

https://github.com/llvm/llvm-project/pull/95904


More information about the llvm-commits mailing list