1; RUN: llc < %s -frame-pointer=all -mtriple=i686-- | FileCheck %s --check-prefix=CHECK-X86
2; RUN: llc < %s -frame-pointer=all -mtriple=x86_64-- | FileCheck %s --check-prefix=CHECK-X64
3
4define i8* @f() nounwind readnone optsize {
5entry:
6  %0 = tail call i8* @llvm.addressofreturnaddress()    ; <i8*> [#uses=1]
7  ret i8* %0
8  ; CHECK-X86-LABEL: f:
9  ; CHECK-X86: pushl   %ebp
10  ; CHECK-X86: movl    %esp, %ebp
11  ; CHECK-X86: leal    4(%ebp), %eax
12
13  ; CHECK-X64-LABEL: f:
14  ; CHECK-X64: pushq   %rbp
15  ; CHECK-X64: movq    %rsp, %rbp
16  ; CHECK-X64: leaq    8(%rbp), %rax
17}
18
19declare i8* @llvm.addressofreturnaddress() nounwind readnone
20