summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/frame-pointer.c
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-12-14 21:02:23 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-12-14 21:02:23 +0000
commit224dd63fff707579128a92948e66d16c8203f6ec (patch)
treef770c03ff81da3deba67e8a0cf012c615ee787e3 /clang/test/Driver/frame-pointer.c
parentb7ec06c5c9106f01717fd91bb3906aa41ad6c06c (diff)
downloadbcm5719-llvm-224dd63fff707579128a92948e66d16c8203f6ec.tar.gz
bcm5719-llvm-224dd63fff707579128a92948e66d16c8203f6ec.zip
Don't use the frame pointer on linux x86 and x86_64 if optimizing. This
matches gcc's behavior. Fixes PR8186. llvm-svn: 146586
Diffstat (limited to 'clang/test/Driver/frame-pointer.c')
-rw-r--r--clang/test/Driver/frame-pointer.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/Driver/frame-pointer.c b/clang/test/Driver/frame-pointer.c
new file mode 100644
index 00000000000..da72ec23c79
--- /dev/null
+++ b/clang/test/Driver/frame-pointer.c
@@ -0,0 +1,24 @@
+// RUN: %clang -ccc-host-triple i386-pc-linux -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
+// RUN: %clang -ccc-host-triple i386-pc-linux -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
+// RUN: %clang -ccc-host-triple i386-pc-linux -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s
+// RUN: %clang -ccc-host-triple i386-pc-linux -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s
+// RUN: %clang -ccc-host-triple i386-pc-linux -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s
+
+
+// RUN: %clang -ccc-host-triple x86_64-pc-linux -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s
+// RUN: %clang -ccc-host-triple x86_64-pc-linux -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s
+// RUN: %clang -ccc-host-triple x86_64-pc-linux -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s
+// RUN: %clang -ccc-host-triple x86_64-pc-linux -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s
+// RUN: %clang -ccc-host-triple x86_64-pc-linux -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s
+
+// CHECK0-32: -mdisable-fp-elim
+// CHECK1-32-NOT: -mdisable-fp-elim
+// CHECK2-32-NOT: -mdisable-fp-elim
+// CHECK3-32-NOT: -mdisable-fp-elim
+// CHECKs-32-NOT: -mdisable-fp-elim
+
+// CHECK0-64: -mdisable-fp-elim
+// CHECK1-64-NOT: -mdisable-fp-elim
+// CHECK2-64-NOT: -mdisable-fp-elim
+// CHECK3-64-NOT: -mdisable-fp-elim
+// CHECKs-64-NOT: -mdisable-fp-elim
OpenPOWER on IntegriCloud