[SystemZ] CodeGen/SystemZ/asm-18.ll run with -verify-machineinstrs
[oota-llvm.git] / test / CodeGen / SystemZ / frame-11.ll
1 ; Test the stackrestore builtin.
2 ;
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
4
5 declare i8 *@llvm.stacksave()
6 declare void @llvm.stackrestore(i8 *)
7
8 ; we should use a frame pointer and tear down the frame based on %r11
9 ; rather than %r15.
10 define void @f1(i32 %count1, i32 %count2) {
11 ; CHECK-LABEL: f1:
12 ; CHECK: stmg %r11, %r15, 88(%r15)
13 ; CHECK: aghi %r15, -160
14 ; CHECK: lgr %r11, %r15
15 ; CHECK: lgr %r15, %r{{[0-5]}}
16 ; CHECK: lmg %r11, %r15, 248(%r11)
17 ; CHECK: br %r14
18   %src = call i8 *@llvm.stacksave()
19   %array1 = alloca i8, i32 %count1
20   store volatile i8 0, i8 *%array1
21   call void @llvm.stackrestore(i8 *%src)
22   %array2 = alloca i8, i32 %count2
23   store volatile i8 0, i8 *%array2
24   ret void
25 }