revert: i386.c (ix86_rtx_costs): For standard 80387 constants...
Revert: 2006-05-08 Uros Bizjak <uros@kss-loka.si> * 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. * config/i386/i386.md: Add new splitter pattern to split float_extended load of constant from constant pool into pure constant load. From-SVN: r119246
This commit is contained in:
parent
56c7f9c1d0
commit
ce7d4645bb
|
@ -1,3 +1,15 @@
|
|||
2006-11-27 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
Revert:
|
||||
2006-05-08 Uros Bizjak <uros@kss-loka.si>
|
||||
* 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.
|
||||
|
||||
* config/i386/i386.md: Add new splitter pattern to split
|
||||
float_extended load of constant from constant pool into
|
||||
pure constant load.
|
||||
|
||||
2006-11-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* doc/install.texi: Move GMP/MPFR configure options from Fortran
|
||||
|
|
|
@ -17705,22 +17705,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total)
|
|||
if (!TARGET_SSE_MATH
|
||||
|| mode == XFmode
|
||||
|| (mode == DFmode && !TARGET_SSE2))
|
||||
/* 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:
|
||||
|
|
|
@ -2906,6 +2906,38 @@
|
|||
operands[1] = c;
|
||||
})
|
||||
|
||||
(define_split
|
||||
[(set (match_operand 0 "register_operand" "")
|
||||
(float_extend (match_operand 1 "memory_operand" "")))]
|
||||
"reload_completed
|
||||
&& GET_CODE (operands[1]) == MEM
|
||||
&& (GET_MODE (operands[0]) == XFmode
|
||||
|| GET_MODE (operands[0]) == SFmode || GET_MODE (operands[0]) == DFmode)
|
||||
&& constant_pool_reference_p (operands[1])"
|
||||
[(set (match_dup 0) (match_dup 1))]
|
||||
{
|
||||
rtx c = avoid_constant_pool_reference (SET_SRC (PATTERN (curr_insn)));
|
||||
rtx r = operands[0];
|
||||
|
||||
if (GET_CODE (r) == SUBREG)
|
||||
r = SUBREG_REG (r);
|
||||
|
||||
if (SSE_REG_P (r))
|
||||
{
|
||||
if (!standard_sse_constant_p (c))
|
||||
FAIL;
|
||||
}
|
||||
else if (FP_REG_P (r))
|
||||
{
|
||||
if (!standard_80387_constant_p (c))
|
||||
FAIL;
|
||||
}
|
||||
else if (MMX_REG_P (r))
|
||||
FAIL;
|
||||
|
||||
operands[1] = c;
|
||||
})
|
||||
|
||||
(define_insn "swapxf"
|
||||
[(set (match_operand:XF 0 "register_operand" "+f")
|
||||
(match_operand:XF 1 "register_operand" "+f"))
|
||||
|
|
Loading…
Reference in New Issue