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: stwu 1, -16(1)
11 ; CHECK-NEXT: lwz 3, 0(1)
12 ; CHECK-NEXT: addi 1, 1, 16
15 %0 = tail call ptr @llvm.frameaddress(i32 1) ; <ptr> [#uses=1]
19 declare ptr @llvm.returnaddress(i32) nounwind readnone
21 define ptr @g() nounwind readnone {
23 ; CHECK: # %bb.0: # %entry
25 ; CHECK-NEXT: stwu 1, -16(1)
26 ; CHECK-NEXT: stw 0, 20(1)
27 ; CHECK-NEXT: lwz 3, 0(1)
28 ; CHECK-NEXT: lwz 3, 0(3)
29 ; CHECK-NEXT: lwz 3, 4(3)
30 ; CHECK-NEXT: lwz 0, 20(1)
31 ; CHECK-NEXT: addi 1, 1, 16
35 %0 = tail call ptr @llvm.returnaddress(i32 1) ; <ptr> [#uses=1]