summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/dynamic-alloca-in-entry.ll
blob: 2ac89baaf9f7440590632b70a1efeaecc9cbce9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck %s

; Allocas with unknown size in the entry block are dynamic.
define void @foo(i32 %n) {
  %m = alloca i32, i32 %n
  ret void
}
; CHECK-LABEL: _foo:
; CHECK: calll __chkstk
; CHECK: retl

; Use of inalloca implies that that the alloca is not static.
define void @bar() {
  %m = alloca i32, inalloca
  ret void
}
; CHECK-LABEL: _bar:
; CHECK: calll __chkstk
; CHECK: retl