Re-land [openmp] Fix warnings when building on Windows with latest MSVC or Clang...
[llvm-project.git] / llvm / test / CodeGen / X86 / addr-of-ret-addr.ll
blobc065f17222666e0cb6a8249f5096f828594b960c
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
4 define ptr @f() nounwind readnone optsize {
5 entry:
6   %0 = tail call ptr @llvm.addressofreturnaddress()    ; <ptr> [#uses=1]
7   ret ptr %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
19 declare ptr @llvm.addressofreturnaddress() nounwind readnone