1 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s 2 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 -regalloc=basic | FileCheck %s 3 4 declare i8* @llvm.frameaddress(i32) nounwind readnone 5 6 define i8* @g2() nounwind readnone { 7 entry: 8 ; CHECK: _g2: 9 ; CHECK: lwz r3, 0(r1) 10 %0 = tail call i8* @llvm.frameaddress(i32 1) ; <i8*> [#uses=1] 11 ret i8* %0 12 } 13 14 declare i8* @llvm.returnaddress(i32) nounwind readnone 15 16 define i8* @g() nounwind readnone { 17 entry: 18 ; CHECK: _g: 19 ; CHECK: mflr r0 20 ; CHECK: stw r0, 8(r1) 21 ; CHECK: lwz r2, 0(r1) 22 ; CHECK: lwz r3, 8(r2) 23 %0 = tail call i8* @llvm.returnaddress(i32 1) ; <i8*> [#uses=1] 24 ret i8* %0 25 } 26