aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/x86_64-profiling-keep-fp.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/x86_64-profiling-keep-fp.c')
-rw-r--r--test/CodeGen/x86_64-profiling-keep-fp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/x86_64-profiling-keep-fp.c b/test/CodeGen/x86_64-profiling-keep-fp.c
new file mode 100644
index 000000000000..ca679fa46670
--- /dev/null
+++ b/test/CodeGen/x86_64-profiling-keep-fp.c
@@ -0,0 +1,14 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O3 -pg -S -o - %s | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O3 -momit-leaf-frame-pointer -pg -S -o - %s | \
+// RUN: FileCheck %s
+
+// Test that the frame pointer is kept when compiling with
+// profiling.
+
+//CHECK: pushq %rbp
+int main(void)
+{
+ return 0;
+}