brintos

brintos / llvm-project-archived public Read only

0
0
Text · 483 B · 55e333c Raw
21 lines · plain
1; RUN: llc < %s -mtriple=xcore | FileCheck %s2 3declare void @g()4declare ptr @llvm.stacksave() nounwind5declare void @llvm.stackrestore(ptr) nounwind6 7define void @f(ptr %p, i32 %size) {8allocas:9  %0 = call ptr @llvm.stacksave()10  %a = alloca i32, i32 %size11  store ptr %a, ptr %p12  call void @g()13  call void @llvm.stackrestore(ptr %0)14  ret void15}16; CHECK-LABEL: f:17; CHECK: ldaw [[REGISTER:r[0-9]+]], {{r[0-9]+}}[-r1]18; CHECK: set sp, [[REGISTER]]19; CHECK: extsp 120; CHECK: bl g21