summaryrefslogtreecommitdiff
path: root/test/CodeGen/SystemZ
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-01-13 15:44:44 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-01-13 15:44:44 +0000
commit91e35c753332fdea40f349099116d6a64a1d77ca (patch)
tree745cdedd53d4e490654d2bc986a0a8674fe95b3e /test/CodeGen/SystemZ
parentdcbd7ca4a719ba8cd84bfa19cb0f4ef594d6b01c (diff)
downloadllvm-91e35c753332fdea40f349099116d6a64a1d77ca.tar.gz
llvm-91e35c753332fdea40f349099116d6a64a1d77ca.tar.bz2
llvm-91e35c753332fdea40f349099116d6a64a1d77ca.tar.xz
[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
Diffstat (limited to 'test/CodeGen/SystemZ')
-rw-r--r--test/CodeGen/SystemZ/frame-11.ll13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/CodeGen/SystemZ/frame-11.ll b/test/CodeGen/SystemZ/frame-11.ll
index 5145b4d1c8..575a4335d5 100644
--- a/test/CodeGen/SystemZ/frame-11.ll
+++ b/test/CodeGen/SystemZ/frame-11.ll
@@ -2,17 +2,24 @@
;
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
+declare i8 *@llvm.stacksave()
declare void @llvm.stackrestore(i8 *)
; we should use a frame pointer and tear down the frame based on %r11
; rather than %r15.
-define void @f1(i8 *%src) {
+define void @f1(i32 %count1, i32 %count2) {
; CHECK-LABEL: f1:
; CHECK: stmg %r11, %r15, 88(%r15)
+; CHECK: aghi %r15, -160
; CHECK: lgr %r11, %r15
-; CHECK: lgr %r15, %r2
-; CHECK: lmg %r11, %r15, 88(%r11)
+; CHECK: lgr %r15, %r{{[0-5]}}
+; CHECK: lmg %r11, %r15, 248(%r11)
; CHECK: br %r14
+ %src = call i8 *@llvm.stacksave()
+ %array1 = alloca i8, i32 %count1
+ store volatile i8 0, i8 *%array1
call void @llvm.stackrestore(i8 *%src)
+ %array2 = alloca i8, i32 %count2
+ store volatile i8 0, i8 *%array2
ret void
}