1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -regalloc=basic | FileCheck %s
5 declare ptr @llvm.frameaddress(i32) nounwind readnone
7 define ptr @g2() nounwind readnone {
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: lwz 3, 0(1)
13 %0 = tail call ptr @llvm.frameaddress(i32 1) ; <ptr> [#uses=1]
17 declare ptr @llvm.returnaddress(i32) nounwind readnone
19 define ptr @g() nounwind readnone {
21 ; CHECK: # %bb.0: # %entry
23 ; CHECK-NEXT: stwu 1, -16(1)
24 ; CHECK-NEXT: stw 0, 20(1)
25 ; CHECK-NEXT: lwz 3, 0(1)
26 ; CHECK-NEXT: lwz 3, 0(3)
27 ; CHECK-NEXT: lwz 3, 4(3)
28 ; CHECK-NEXT: lwz 0, 20(1)
29 ; CHECK-NEXT: addi 1, 1, 16
33 %0 = tail call ptr @llvm.returnaddress(i32 1) ; <ptr> [#uses=1]