view test/CodeGen/X86/dynamic-alloca-in-entry.ll @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 54457678186b
children 1172e4bd9c6f
line wrap: on
line source

; 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