xref: /llvm-project/llvm/test/CodeGen/X86/stack-guard-memloc-vararg.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc -mtriple=x86_64 -O0 < %s | FileCheck %s
2
3; Check that we don't crash on this input.
4; CHECK-LABEL: @foo
5; CHECK: __stack_chk_guard
6; CHECK: retq
7define hidden void @foo(ptr %ptr) #0 {
8entry:
9  %args.addr = alloca ptr, align 8
10  %0 = va_arg ptr %args.addr, ptr
11  store ptr %0, ptr %ptr
12  ret void
13}
14
15attributes #0 = { sspstrong }
16attributes #1 = { optsize }
17
18