1; This test is attempting to detect that the compiler disables stack
2; probe calls when the corresponding option is specified.
3;
4; RUN: llc -mtriple=i686-windows-msvc < %s | FileCheck %s
5
6target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
7
8define i32 @test1() "no-stack-arg-probe" {
9  %buffer = alloca [4095 x i8]
10
11  ret i32 0
12
13; CHECK-LABEL: _test1:
14; CHECK-NOT: movl $4095, %eax
15; CHECK: subl $4095, %esp
16; CHECK-NOT: calll __chkstk
17}
18
19define i32 @test2() "no-stack-arg-probe" {
20  %buffer = alloca [4096 x i8]
21
22  ret i32 0
23
24; CHECK-LABEL: _test2:
25; CHECK-NOT: movl $4096, %eax
26; CHECK: subl $4096, %esp
27; CHECK-NOT: calll __chkstk
28}
29
30define i32 @test3(i32 %size) "no-stack-arg-probe" {
31  %buffer = alloca i8, i32 %size
32
33  ret i32 0
34
35; CHECK-LABEL: _test3:
36; CHECK: subl {{.*}}, %esp
37; CHECK-NOT: calll __chkstk
38}
39