i386.c (inline_memory_move_cost): Check "in" for 2 in MMX_CLASS_P case.
authorUros Bizjak <uros@gcc.gnu.org>
Thu, 29 Nov 2018 18:22:30 +0000 (19:22 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 29 Nov 2018 18:22:30 +0000 (19:22 +0100)
* config/i386/i386.c (inline_memory_move_cost):
Check "in" for 2 in MMX_CLASS_P case.
* config/i386/mmx.md (*mov<mode>_internal): Correct
TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
alternatives in preferred_for_speed attribute calculation.

From-SVN: r266635

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/mmx.md

index bc8d2b1..8cf443f 100644 (file)
@@ -1,3 +1,11 @@
+2018-11-29  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.c (inline_memory_move_cost):
+       Check "in" for 2 in MMX_CLASS_P case.
+       * config/i386/mmx.md (*mov<mode>_internal): Correct
+       TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
+       alternatives in preferred_for_speed attribute calculation.
+
 2018-11-29  Martin Sebor  <msebor@redhat.com>
 
        PR c/88172
@@ -20,7 +28,7 @@
        inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
        * opts.c (control_options_for_live_patching): New function.
        (finish_options): Make flag_live_patching incompatible with flag_lto.
-       Control IPA optimizations based on different levels of 
+       Control IPA optimizations based on different levels of
        flag_live_patching.
 
 2018-11-29  Giuliano Belinassi  <giuliano.belinassi@usp.br>
index cef809f..209b74a 100644 (file)
@@ -39480,8 +39480,7 @@ sse_store_index (machine_mode mode)
    Q_REGS classes.
  */
 static inline int
-inline_memory_move_cost (machine_mode mode, enum reg_class regclass,
-                        int in)
+inline_memory_move_cost (machine_mode mode, enum reg_class regclass, int in)
 {
   int cost;
   if (FLOAT_CLASS_P (regclass))
@@ -39528,7 +39527,7 @@ inline_memory_move_cost (machine_mode mode, enum reg_class regclass,
          default:
            return 100;
        }
-      if (in)
+      if (in == 2)
         return MAX (ix86_cost->mmx_load [index], ix86_cost->mmx_store [index]);
       return in ? ix86_cost->mmx_load [index] : ix86_cost->mmx_store [index];
     }
@@ -39567,7 +39566,7 @@ inline_memory_move_cost (machine_mode mode, enum reg_class regclass,
        if (mode == TFmode)
          mode = XFmode;
        if (in == 2)
-         cost = MAX (ix86_cost->int_load[2] , ix86_cost->int_store[2]);
+         cost = MAX (ix86_cost->int_load[2], ix86_cost->int_store[2]);
        else if (in)
          cost = ix86_cost->int_load[2];
        else
@@ -39577,8 +39576,7 @@ inline_memory_move_cost (machine_mode mode, enum reg_class regclass,
 }
 
 static int
-ix86_memory_move_cost (machine_mode mode, reg_class_t regclass,
-                      bool in)
+ix86_memory_move_cost (machine_mode mode, reg_class_t regclass, bool in)
 {
   return inline_memory_move_cost (mode, (enum reg_class) regclass, in ? 1 : 0);
 }
index e60b229..66da7bc 100644 (file)
           ]
           (const_string "DI")))
    (set (attr "preferred_for_speed")
-     (cond [(eq_attr "alternative" "10,15")
+     (cond [(eq_attr "alternative" "9,15")
              (symbol_ref "TARGET_INTER_UNIT_MOVES_FROM_VEC")
-           (eq_attr "alternative" "11,16")
+           (eq_attr "alternative" "10,16")
              (symbol_ref "TARGET_INTER_UNIT_MOVES_TO_VEC")
           ]
           (symbol_ref "true")))])