summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/retaddr.ll
blob: 3794f6e12af789211f27f984a494ef23c22bfe48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | grep mflr
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | grep lwz
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 | grep "ld r., 16(r1)"

define void @foo(i8** %X) nounwind {
entry:
	%tmp = tail call i8* @llvm.returnaddress( i32 0 )		; <i8*> [#uses=1]
	store i8* %tmp, i8** %X, align 4
	ret void
}

declare i8* @llvm.returnaddress(i32)