]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.md ("*movtf_internal): Penalize moves to and from integer registers.
authorUros Bizjak <ubizjak@gmail.com>
Mon, 11 Jun 2007 16:06:19 +0000 (18:06 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 11 Jun 2007 16:06:19 +0000 (18:06 +0200)
        * config/i386/i386.md ("*movtf_internal): Penalize moves to and
        from integer registers.
        (FP mode splitters): Handle TFmode.

From-SVN: r125623

gcc/ChangeLog
gcc/config/i386/i386.md

index a4414797048124f17b50fb2dd338e651e3258ee8..e821198ea833ee52ec22fcba93bbcfb392658611 100644 (file)
@@ -1,3 +1,9 @@
+2007-06-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md ("*movtf_internal): Penalize moves to and
+       from integer registers.
+       (FP mode splitters): Handle TFmode.
+
 2007-06-11  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree-ssa-structalias.c (find_what_p_points_to): Return false
index 1a4733b4da1413a46d39d08f60c78673ecbea349..905e1c19c1afd3cba390c65ab94fd207f830c5db 100644 (file)
   [(set_attr "type" "fmov,fmov,fmov,multi,multi")
    (set_attr "mode" "XF,XF,XF,SI,SI")])
 
+(define_expand "movtf"
+  [(set (match_operand:TF 0 "nonimmediate_operand" "")
+       (match_operand:TF 1 "nonimmediate_operand" ""))]
+  "TARGET_64BIT"
+{
+  ix86_expand_move (TFmode, operands);
+  DONE;
+})
+
+(define_insn "*movtf_internal"
+  [(set (match_operand:TF 0 "nonimmediate_operand" "=x,m,x,?r,?o")
+       (match_operand:TF 1 "general_operand" "xm,x,C,roF,Fr"))]
+  "TARGET_64BIT
+   && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+{
+  switch (which_alternative)
+    {
+    case 0:
+    case 1:
+      if (get_attr_mode (insn) == MODE_V4SF)
+       return "movaps\t{%1, %0|%0, %1}";
+      else
+       return "movdqa\t{%1, %0|%0, %1}";
+    case 2:
+      if (get_attr_mode (insn) == MODE_V4SF)
+       return "xorps\t%0, %0";
+      else
+       return "pxor\t%0, %0";
+    case 3:
+    case 4:
+       return "#";
+    default:
+      gcc_unreachable ();
+    }
+}
+  [(set_attr "type" "ssemov,ssemov,sselog1,*,*")
+   (set (attr "mode")
+        (cond [(eq_attr "alternative" "0,2")
+                (if_then_else
+                  (ne (symbol_ref "optimize_size")
+                      (const_int 0))
+                  (const_string "V4SF")
+                  (const_string "TI"))
+              (eq_attr "alternative" "1")
+                (if_then_else
+                  (ior (ne (symbol_ref "TARGET_SSE_TYPELESS_STORES")
+                           (const_int 0))
+                       (ne (symbol_ref "optimize_size")
+                           (const_int 0)))
+                  (const_string "V4SF")
+                  (const_string "TI"))]
+              (const_string "DI")))])
+
 (define_split
   [(set (match_operand 0 "nonimmediate_operand" "")
        (match_operand 1 "general_operand" ""))]
        (float_extend (match_operand 1 "memory_operand" "")))]
   "reload_completed
    && MEM_P (operands[1])
-   && (GET_MODE (operands[0]) == XFmode
+   && (GET_MODE (operands[0]) == TFmode
+       || GET_MODE (operands[0]) == XFmode
        || GET_MODE (operands[0]) == SFmode
        || GET_MODE (operands[0]) == DFmode)
    && (operands[2] = find_constant_src (insn))"
     operands[1] = CONST1_RTX (<MODE>mode);
 })
 
-(define_expand "movtf"
-  [(set (match_operand:TF 0 "nonimmediate_operand" "")
-       (match_operand:TF 1 "nonimmediate_operand" ""))]
-  "TARGET_64BIT"
-{
-  ix86_expand_move (TFmode, operands);
-  DONE;
-})
-
-(define_insn "*movtf_internal"
-  [(set (match_operand:TF 0 "nonimmediate_operand" "=r,o,x,x,xm")
-       (match_operand:TF 1 "general_operand" "riFo,riF,C,xm,x"))]
-  "TARGET_64BIT
-   && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
-{
-  switch (which_alternative)
-    {
-    case 0:
-    case 1:
-      return "#";
-    case 2:
-      if (get_attr_mode (insn) == MODE_V4SF)
-       return "xorps\t%0, %0";
-      else
-       return "pxor\t%0, %0";
-    case 3:
-    case 4:
-      if (get_attr_mode (insn) == MODE_V4SF)
-       return "movaps\t{%1, %0|%0, %1}";
-      else
-       return "movdqa\t{%1, %0|%0, %1}";
-    default:
-      gcc_unreachable ();
-    }
-}
-  [(set_attr "type" "*,*,sselog1,ssemov,ssemov")
-   (set (attr "mode")
-        (cond [(eq_attr "alternative" "2,3")
-                (if_then_else
-                  (ne (symbol_ref "optimize_size")
-                      (const_int 0))
-                  (const_string "V4SF")
-                  (const_string "TI"))
-              (eq_attr "alternative" "4")
-                (if_then_else
-                  (ior (ne (symbol_ref "TARGET_SSE_TYPELESS_STORES")
-                           (const_int 0))
-                       (ne (symbol_ref "optimize_size")
-                           (const_int 0)))
-                  (const_string "V4SF")
-                  (const_string "TI"))]
-              (const_string "DI")))])
-
 (define_split
   [(set (match_operand:TF 0 "nonimmediate_operand" "")
         (match_operand:TF 1 "general_operand" ""))]
-  "reload_completed && !SSE_REG_P (operands[0])
-   && !SSE_REG_P (operands[1])"
+  "reload_completed
+   && !(SSE_REG_P (operands[0]) || SSE_REG_P (operands[1]))"
   [(const_int 0)]
   "ix86_split_long_move (operands); DONE;")
 \f