linux-packaging-mono/external/llvm/test/CodeGen/X86/stack-probe-red-zone.ll
Xamarin Public Jenkins (auto-signing) 64ac736ec5 Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
2019-04-12 14:10:50 +00:00

22 lines
605 B
LLVM

; RUN: llc -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
; Ensure that red zone usage occurs.
define void @testStackProbesOff() {
%array = alloca [40096 x i8], align 16
ret void
; CHECK-LABEL: testStackProbesOff:
; CHECK: subq $39976, %rsp # imm = 0x9C28
}
; Ensure stack probes do not result in red zone usage.
define void @testStackProbesOn() "probe-stack"="__probestack" {
%array = alloca [40096 x i8], align 16
ret void
; CHECK-LABEL: testStackProbesOn:
; CHECK: movl $40104, %eax # imm = 0x9CA8
; CHECK-NEXT: callq __probestack
; CHECK-NEXT: subq %rax, %rsp
}