From: uros Date: Mon, 27 Nov 2006 08:03:45 +0000 (+0000) Subject: Revert: X-Git-Tag: upstream/4.9.2~51839 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f309fd62fbd727498285f833d81e32022409148c;p=platform%2Fupstream%2Flinaro-gcc.git Revert: 2006-05-08 Uros Bizjak * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119246 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 + + Revert: + 2006-05-08 Uros Bizjak + * 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 * doc/install.texi: Move GMP/MPFR configure options from Fortran @@ -10,8 +22,8 @@ 2006-11-26 Razya Ladklesky - * testsuite/gcc.dg/ipa/ipa-6.c: New. - + * testsuite/gcc.dg/ipa/ipa-6.c: New. + 2006-11-26 Razya Ladklesky PR tree-optimization/29122 @@ -2070,7 +2082,7 @@ 2006-11-05 Kaz Kojima * config/sh/lib1funcs-4-300.asm: Guard entire file with - #if !__SHMEDIA__ . + #if !__SHMEDIA__ . 2006-11-05 Jakub Jelinek 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"))