Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 91e35c7

Browse files
author
Richard Sandiford
committed
[SystemZ] Flesh out stackrestore test (frame-11.ll)
...so that it does something vaguely sensible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199117 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent dcbd7ca commit 91e35c7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/CodeGen/SystemZ/frame-11.ll

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,24 @@
22
;
33
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
44

5+
declare i8 *@llvm.stacksave()
56
declare void @llvm.stackrestore(i8 *)
67

78
; we should use a frame pointer and tear down the frame based on %r11
89
; rather than %r15.
9-
define void @f1(i8 *%src) {
10+
define void @f1(i32 %count1, i32 %count2) {
1011
; CHECK-LABEL: f1:
1112
; CHECK: stmg %r11, %r15, 88(%r15)
13+
; CHECK: aghi %r15, -160
1214
; CHECK: lgr %r11, %r15
13-
; CHECK: lgr %r15, %r2
14-
; CHECK: lmg %r11, %r15, 88(%r11)
15+
; CHECK: lgr %r15, %r{{[0-5]}}
16+
; CHECK: lmg %r11, %r15, 248(%r11)
1517
; CHECK: br %r14
18+
%src = call i8 *@llvm.stacksave()
19+
%array1 = alloca i8, i32 %count1
20+
store volatile i8 0, i8 *%array1
1621
call void @llvm.stackrestore(i8 *%src)
22+
%array2 = alloca i8, i32 %count2
23+
store volatile i8 0, i8 *%array2
1724
ret void
1825
}

0 commit comments

Comments
 (0)