1 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
3 ; The current function's frame address is the address of
4 ; the optional back chain slot.
5 define i8* @fp0() nounwind {
8 ; CHECK: la %r2, 0(%r15)
10 %0 = tail call i8* @llvm.frameaddress(i32 0)
14 ; Check that the frame address is correct in a presence
16 define i8* @fp0f() nounwind {
19 ; CHECK: aghi %r15, -168
20 ; CHECK: la %r2, 168(%r15)
21 ; CHECK: aghi %r15, 168
23 %0 = alloca i64, align 8
24 %1 = tail call i8* @llvm.frameaddress(i32 0)
28 declare i8* @llvm.frameaddress(i32) nounwind readnone