aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/i386-387-8.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/i386-387-8.c')
-rw-r--r--gcc/testsuite/gcc.dg/i386-387-8.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/i386-387-8.c b/gcc/testsuite/gcc.dg/i386-387-8.c
new file mode 100644
index 00000000000..05787160b00
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/i386-387-8.c
@@ -0,0 +1,12 @@
+/* Verify that 387 fptan instruction is generated. Also check fptan
+ peephole2 optimizer. */
+/* { dg-do compile { target "i?86-*-*" } } */
+/* { dg-options "-O2 -ffast-math -march=i686" } */
+/* { dg-final { scan-assembler "fptan" } } */
+/* { dg-final { scan-assembler-not "fld1" } } */
+
+double f1(double x)
+{
+ return 1.0 / tan(x);
+}
+