XCore target: Fix Vararg handling
[oota-llvm.git] / test / CodeGen / XCore / 2011-08-01-DynamicAllocBug.ll
1 ; RUN: llc < %s -march=xcore | FileCheck %s
2
3 declare void @g()
4 declare i8* @llvm.stacksave() nounwind
5 declare void @llvm.stackrestore(i8*) nounwind
6
7 define void @f(i32** %p, i32 %size) {
8 allocas:
9   %0 = call i8* @llvm.stacksave()
10   %a = alloca i32, i32 %size
11   store i32* %a, i32** %p
12   call void @g()
13   call void @llvm.stackrestore(i8* %0)
14   ret void
15 }
16 ; CHECK-LABEL: f:
17 ; CHECK: ldaw [[REGISTER:r[0-9]+]], {{r[0-9]+}}[-r1]
18 ; CHECK: set sp, [[REGISTER]]
19 ; CHECK: extsp 1
20 ; CHECK: bl g