aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <uros@kss-loka.si>2006-05-08 08:10:03 +0200
committerUros Bizjak <uros@gcc.gnu.org>2006-05-08 08:10:03 +0200
commitb81bd6c9a2a22462cba3e8bdd42467c449c36a80 (patch)
treec017b75f89fbb9eab872baa10d877f7a5c3d1c69 /gcc
parentbca504069d503b69f51f380c86c5c929651c9da8 (diff)
downloadgcc-b81bd6c9a2a22462cba3e8bdd42467c449c36a80.zip
gcc-b81bd6c9a2a22462cba3e8bdd42467c449c36a80.tar.gz
gcc-b81bd6c9a2a22462cba3e8bdd42467c449c36a80.tar.bz2
re PR target/27277 (standard i387 constant loading insns (fldz, fld1) are not generated anymore)
PR target/27277 * config/i386/i386.c (ix86_rtx_costs) [FLOAT_EXTEND]: For standard 80387 constants, raise the cost to prevent compress_float_constant() to generate load from memory. From-SVN: r113622
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c17
2 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1bb7acb..631921b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-08 Uros Bizjak <uros@kss-loka.si>
+
+ PR target/27277
+ * config/i386/i386.c (ix86_rtx_costs) [FLOAT_EXTEND]: For
+ standard 80387 constants, raise the cost to prevent
+ compress_float_constant() to generate load from memory.
+
2006-05-08 Kazu Hirata <kazu@codesourcery.com>
* config/arm/constraints.md (c): Fix a typo.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a092484..df5a4e6 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -17102,7 +17102,22 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total)
if (!TARGET_SSE_MATH
|| mode == XFmode
|| (mode == DFmode && !TARGET_SSE2))
- *total = 0;
+ /* For standard 80387 constants, raise the cost to prevent
+ compress_float_constant() to generate load from memory. */
+ switch (standard_80387_constant_p (XEXP (x, 0)))
+ {
+ case -1:
+ case 0:
+ *total = 0;
+ break;
+ case 1: /* 0.0 */
+ *total = 1;
+ break;
+ default:
+ *total = (x86_ext_80387_constants & TUNEMASK
+ || optimize_size
+ ? 1 : 0);
+ }
return false;
case ABS: