1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/CodeGen/X86/read-fp-no-frame-pointer.ll
Pat Gavlin a6d3ba4544 Allow {e,r}bp as the target of {read,write}_register.
This patch allows the read_register and write_register intrinsics to
read/write the RBP/EBP registers on X86 iff the targeted register is
the frame pointer for the containing function.

Differential Revision: http://reviews.llvm.org/D10977

llvm-svn: 241827
2015-07-09 17:40:29 +00:00

13 lines
326 B
LLVM

; RUN: not llc < %s -mtriple=x86_64-linux-gnueabi 2>&1 | FileCheck %s
define i32 @get_frame() nounwind {
entry:
; CHECK: register ebp is allocatable: function has no frame pointer
%fp = call i32 @llvm.read_register.i32(metadata !0)
ret i32 %fp
}
declare i32 @llvm.read_register.i32(metadata) nounwind
!0 = !{!"ebp\00"}