summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/read-fp-no-frame-pointer.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-08-07 23:01:33 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-08-07 23:01:33 +0000
commitee8648bdac07986a0f1ec897b02ec82a2f144d46 (patch)
tree52d1861acda1205241ee35a94aa63129c604d469 /test/CodeGen/X86/read-fp-no-frame-pointer.ll
parent1a82d4c088707c791c792f6822f611b47a12bdfe (diff)
Diffstat (limited to 'test/CodeGen/X86/read-fp-no-frame-pointer.ll')
-rw-r--r--test/CodeGen/X86/read-fp-no-frame-pointer.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/read-fp-no-frame-pointer.ll b/test/CodeGen/X86/read-fp-no-frame-pointer.ll
new file mode 100644
index 000000000000..9f78c294ce88
--- /dev/null
+++ b/test/CodeGen/X86/read-fp-no-frame-pointer.ll
@@ -0,0 +1,12 @@
+; 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"}