This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386]: Unify TARGET_SSE_MATH for float* patterns


Richard Henderson wrote:

On Wed, Dec 15, 2004 at 07:39:27AM +0100, Uros Bizjak wrote:


Before this pattern, we have:

(define_expand "floathisf2"
[(set (match_operand:SF 0 "register_operand" "")
(float:SF (match_operand:HI 1 "nonimmediate_operand" "")))]
"TARGET_80387 || TARGET_SSE_MATH"
{
if (TARGET_SSE_MATH)
{
emit_insn (gen_floatsisf2 (operands[0],
convert_to_mode (SImode, operands[1], 0)));



Yes, I saw that, but I have faith in the ability of combine to see though this trick.

I suppose we could enable the pattern if mixed mode is on,
if you care to make that refinement.


Sure! Attached patch implements your suggestion.

2004-12-16 Uros Bizjak <uros@kss-loka.si>

   * config/i386/i386.md (*floathisf2_i387, *floathidf2_i387):
   Also enable for TARGET_MIX_SSE_I387.

Uros.

Index: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.577
diff -u -r1.577 i386.md
--- config/i386/i386.md	16 Dec 2004 06:35:57 -0000	1.577
+++ config/i386/i386.md	16 Dec 2004 07:06:39 -0000
@@ -4453,7 +4453,7 @@
 (define_insn "*floathisf2_i387"
   [(set (match_operand:SF 0 "register_operand" "=f,f")
 	(float:SF (match_operand:HI 1 "nonimmediate_operand" "m,?r")))]
-  "TARGET_80387 && !TARGET_SSE_MATH"
+  "TARGET_80387 && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)"
   "@
    fild%z1\t%1
    #"
@@ -4593,7 +4593,7 @@
 (define_insn "*floathidf2_i387"
   [(set (match_operand:DF 0 "register_operand" "=f,f")
 	(float:DF (match_operand:HI 1 "nonimmediate_operand" "m,?r")))]
-  "TARGET_80387 && !(TARGET_SSE2 && TARGET_SSE_MATH)"
+  "TARGET_80387 && (!(TARGET_SSE2 && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)"
   "@
    fild%z1\t%1
    #"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]