summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-14 12:14:04 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-14 12:14:04 +0000
commitb2e463928ede96a7006774046a584c7ee703e778 (patch)
tree0d386091edd3e271b4afa6d1ccafcfc0d3048e46 /gcc
parent4f426d851259dd51965830bd6ea4e7bdeb5c7b47 (diff)
downloadgcc-b2e463928ede96a7006774046a584c7ee703e778.tar.gz
2009-08-14 Paolo Bonzini <bonzini@gnu.org>
PR target/40934 * config/i386/i386.c (ix86_fp_comparison_strategy): Only enable/disable sahf at function granularity. gcc/testsuite: 2009-08-14 Paolo Bonzini <bonzini@gnu.org> PR target/40934 * gcc.target/i386/pr40934.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150754 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr40934.c15
4 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0862182fe51..5e51aea56f2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-14 Paolo Bonzini <bonzini@gnu.org>
+
+ PR target/40934
+ * config/i386/i386.c (ix86_fp_comparison_strategy):
+ Only enable/disable sahf at function granularity.
+
2009-08-14 Hans-Peter Nilsson <hp@axis.com>
PR rtl-optimization/41064
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index acb7753664b..8b73fca0c6f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -14594,7 +14594,7 @@ ix86_fp_comparison_strategy (enum rtx_code code ATTRIBUTE_UNUSED)
if (TARGET_CMOVE)
return IX86_FPCMP_COMI;
- if (TARGET_SAHF && (TARGET_USE_SAHF || optimize_insn_for_size_p ()))
+ if (TARGET_SAHF && (TARGET_USE_SAHF || optimize_function_for_size_p (cfun)))
return IX86_FPCMP_SAHF;
return IX86_FPCMP_ARITH;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index db94b62afef..e6864f5065e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-14 Paolo Bonzini <bonzini@gnu.org>
+
+ PR target/40934
+ * gcc.target/i386/pr40934.c: New.
+
2009-08-14 Uros Bizjak <ubizjak@gmail.com>
PR target/41019
diff --git a/gcc/testsuite/gcc.target/i386/pr40934.c b/gcc/testsuite/gcc.target/i386/pr40934.c
new file mode 100644
index 00000000000..41f46f88114
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr40934.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -march=i586 -ffast-math" } */
+
+extern double host_frametime;
+extern float pitchvel;
+V_DriftPitch (float delta, float move)
+{
+ if (!delta)
+ move = host_frametime;
+ if (delta > 0)
+ ;
+ else if (delta < 0 && move > -delta)
+ pitchvel = 0;
+}