Begin adding docs and IR-level support for the inalloca attribute
[oota-llvm.git] / test / Verifier / inalloca2.ll
1 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
2
3 declare void @doit(i64* inalloca %a)
4
5 define void @a() {
6 entry:
7   %a = alloca [2 x i32]
8   %b = bitcast [2 x i32]* %a to i64*
9   call void @doit(i64* inalloca %b)
10 ; CHECK: Inalloca argument is not an alloca!
11   ret void
12 }
13
14 define void @b() {
15 entry:
16   %a = alloca i64
17   call void @doit(i64* inalloca %a)
18   call void @doit(i64* inalloca %a)
19 ; CHECK: Allocas can be used at most once with inalloca!
20   ret void
21 }