diff options
Diffstat (limited to 'test/CodeGen/X86/dynamic-alloca-in-entry.ll')
-rw-r--r-- | test/CodeGen/X86/dynamic-alloca-in-entry.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/X86/dynamic-alloca-in-entry.ll b/test/CodeGen/X86/dynamic-alloca-in-entry.ll new file mode 100644 index 0000000..7ed471c --- /dev/null +++ b/test/CodeGen/X86/dynamic-alloca-in-entry.ll @@ -0,0 +1,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 inalloca i32 + ret void +} +; CHECK-LABEL: _bar: +; CHECK: calll __chkstk +; CHECK: retl |