aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/retaddr.ll
blob: 6b9a5e3f0680712cbe53e017f605ab709ee10a70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llvm-as < %s | llc -march=ppc32 | grep mflr
; RUN: llvm-as < %s | llc -march=ppc32 | grep lwz

target triple = "powerpc-apple-darwin8"

define void @foo(i8** %X) {
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)