blob: 7d6d7bac3d6e9e94deb35b1a48455182d4249f97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
; RUN: llc < %s -march=xcore | FileCheck %s
declare void @g()
declare i8* @llvm.stacksave() nounwind
declare void @llvm.stackrestore(i8*) nounwind
define void @f(i32** %p, i32 %size) {
allocas:
%0 = call i8* @llvm.stacksave()
%a = alloca i32, i32 %size
store i32* %a, i32** %p
call void @g()
call void @llvm.stackrestore(i8* %0)
ret void
}
; CHECK: f:
; CHECK: ldaw [[REGISTER:r[0-9]+]], {{r[0-9]+}}[-r1]
; CHECK: set sp, [[REGISTER]]
; CHECK extsp 1
; CHECK bl g
|