aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2006-11-27 09:03:45 +0100
committerUros Bizjak <uros@gcc.gnu.org>2006-11-27 09:03:45 +0100
commitce7d4645bb1e1610a0f2a34928f22f277d1f5d24 (patch)
treef80676d53dcc0472f8acaa1d7e496ea7f16cb29d
parent56c7f9c1d073eb17e95c171e945bfabb322ca5f1 (diff)
downloadgcc-ce7d4645bb1e1610a0f2a34928f22f277d1f5d24.zip
gcc-ce7d4645bb1e1610a0f2a34928f22f277d1f5d24.tar.gz
gcc-ce7d4645bb1e1610a0f2a34928f22f277d1f5d24.tar.bz2
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
-rw-r--r--gcc/ChangeLog18
-rw-r--r--gcc/config/i386/i386.c17
-rw-r--r--gcc/config/i386/i386.md32
3 files changed, 48 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d3f2578..543995a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
@@ -10,8 +22,8 @@
2006-11-26 Razya Ladklesky <razya@il.ibm.com>
- * testsuite/gcc.dg/ipa/ipa-6.c: New.
-
+ * testsuite/gcc.dg/ipa/ipa-6.c: New.
+
2006-11-26 Razya Ladklesky <razya@il.ibm.com>
PR tree-optimization/29122
@@ -2070,7 +2082,7 @@
2006-11-05 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/lib1funcs-4-300.asm: Guard entire file with
- #if !__SHMEDIA__ .
+ #if !__SHMEDIA__ .
2006-11-05 Jakub Jelinek <jakub@redhat.com>
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b6898a1..9e11787 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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);
- }
+ *total = 0;
return false;
case ABS:
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 4caeda6..5265d83 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -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"))