aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-02-21 18:48:19 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-02-21 18:48:19 +0000
commit22cc69c4c0a344d3272567bcefe50506ec1bb3ba (patch)
tree5a334481e4316a43465cf42a8fac0f6c1def4aba
parentbee07d3f4f976d4565502491ad4415b89607d623 (diff)
downloadgcc-22cc69c4c0a344d3272567bcefe50506ec1bb3ba.zip
gcc-22cc69c4c0a344d3272567bcefe50506ec1bb3ba.tar.gz
gcc-22cc69c4c0a344d3272567bcefe50506ec1bb3ba.tar.bz2
i386.c (standard_80387_constant_p): Also prefer the x87's load constant instructions when optimizing for size.
* config/i386/i386.c (standard_80387_constant_p): Also prefer the x87's load constant instructions when optimizing for size. From-SVN: r78231
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7ebb416..00e79b0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-21 Roger Sayle <roger@eyesopen.com>
+
+ * config/i386/i386.c (standard_80387_constant_p): Also prefer
+ the x87's load constant instructions when optimizing for size.
+
2004-02-21 Kazu Hirata <kazu@cs.umass.edu>
* combine.c (SHIFT_COUNT_TRUNCATED): Remove.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 3e5556d..92d56a0 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4333,10 +4333,10 @@ standard_80387_constant_p (rtx x)
if (x == CONST1_RTX (GET_MODE (x)))
return 2;
- /* For XFmode constants, try to find a special 80387 instruction on
- those CPUs that benefit from them. */
+ /* For XFmode constants, try to find a special 80387 instruction when
+ optimizing for size or on those CPUs that benefit from them. */
if (GET_MODE (x) == XFmode
- && x86_ext_80387_constants & TUNEMASK)
+ && (optimize_size || x86_ext_80387_constants & TUNEMASK))
{
REAL_VALUE_TYPE r;
int i;