diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-08 06:10:03 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-08 06:10:03 +0000 |
commit | 77670c1d2c3d9579b06d014a21fb1a550f6dee25 (patch) | |
tree | c017b75f89fbb9eab872baa10d877f7a5c3d1c69 /gcc/config/i386/i386.c | |
parent | 9fdf9cf6299b0649d76b3d008607fa1ee09f55d1 (diff) | |
download | gcc-77670c1d2c3d9579b06d014a21fb1a550f6dee25.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r-- | gcc/config/i386/i386.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a092484da18..df5a4e68d43 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: |