1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc < %s -mtriple=s390x-ibm-zos | FileCheck --check-prefix=CHECK %s
4 ; The current function's frame address is the address of
5 ; the optional back chain slot.
6 define ptr @fp0() nounwind {
11 %0 = tail call ptr @llvm.frameaddress(i32 0)
15 ; Check that the frame address is correct in a presence
17 define ptr @fp0f() nounwind {
19 ; CHECK: stmg 6,7,1904(4)
20 ; CHECK-NEXT: aghi 4,-160
21 ; CHECK-NEXT: la 3,2048(4)
22 ; CHECK-NEXT: lg 7,2072(4)
23 ; CHECK-NEXT: aghi 4,160
26 %0 = alloca i64, align 8
27 %1 = tail call ptr @llvm.frameaddress(i32 0)
31 ; Check the caller's frame address.
32 define ptr @fpcaller() nounwind "backchain" {
33 ; CHECK-LABEL: fpcaller:
34 ; CHECK: stmg 4,7,2048(4)
35 ; CHECK-NEXT: lg 3,2048(4)
36 ; CHECK-NEXT: lmg 4,7,2048(4)
39 %0 = tail call ptr @llvm.frameaddress(i32 1)
43 ; Check the caller's frame address.
44 define ptr @fpcallercaller() nounwind "backchain" {
45 ; CHECK-LABEL: fpcallercaller:
46 ; CHECK: stmg 4,7,2048(4)
47 ; CHECK-NEXT: lg 1,2048(4)
48 ; CHECK-NEXT: lg 3,0(1)
49 ; CHECK-NEXT: lmg 4,7,2048(4)
52 %0 = tail call ptr @llvm.frameaddress(i32 2)
56 declare ptr @llvm.frameaddress(i32) nounwind readnone