llvm.org GIT mirror llvm / release_90 test / CodeGen / X86 / 2004-02-13-FrameReturnAddress.ll
release_90

Tree @release_90 (Download .tar.gz)

2004-02-13-FrameReturnAddress.ll @release_90raw · history · blame

; RUN: llc < %s -mtriple=i686-- | FileCheck %s

declare i8* @llvm.returnaddress(i32)

declare i8* @llvm.frameaddress(i32)

define i8* @test1() {
; CHECK-LABEL: test1:
entry:
  %X = call i8* @llvm.returnaddress( i32 0 )
  ret i8* %X
; CHECK: movl {{.*}}(%esp), %eax
}

define i8* @test2() {
; CHECK-LABEL: test2:
entry:
  %X = call i8* @llvm.frameaddress( i32 0 )
  ret i8* %X
; CHECK: pushl %ebp
; CHECK: popl %ebp
}