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 %s
4 ; The current function's return address is in the link register.
5 define ptr @rt0() norecurse nounwind readnone {
10 %0 = tail call ptr @llvm.returnaddress(i32 0)
14 ; Check the caller's return address.
15 define ptr @rtcaller() nounwind "backchain" {
16 ; CHECK-LABEL: rtcaller:
17 ; CHECK: stmg 4,7,2048(4)
18 ; CHECK-NEXT: lg 1,2048(4)
19 ; CHECK-NEXT: lg 3,24(1)
20 ; CHECK-NEXT: lmg 4,7,2048(4)
23 %0 = tail call ptr @llvm.returnaddress(i32 1)
27 ; Check the caller's caller's return address.
28 define ptr @rtcallercaller() nounwind "backchain" {
29 ; CHECK-LABEL: rtcallercaller:
30 ; CHECK: stmg 4,7,2048(4)
31 ; CHECK-NEXT: lg 1,2048(4)
32 ; CHECK-NEXT: lg 1,0(1)
33 ; CHECK-NEXT: lg 3,24(1)
34 ; CHECK-NEXT: lmg 4,7,2048(4)
37 %0 = tail call ptr @llvm.returnaddress(i32 2)
41 declare ptr @llvm.returnaddress(i32) nounwind readnone