]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[RS6000] Delete duplicate code
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Aug 2016 00:30:04 +0000 (00:30 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Aug 2016 00:30:04 +0000 (00:30 +0000)
This removes the duplicate (TARGET_POWERPC64 && size == 16) block.

* config/rs6000/rs6000.c (rs6000_secondary_reload_direct_move):
Delete duplicated code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239009 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index bec2824710066c134e441f8b7db790a4bf9e0c13..fc1fe6af9598c86b9df5e7093043f16ee25c3e24 100644 (file)
@@ -1,3 +1,8 @@
+2016-08-03  Alan Modra  <amodra@gmail.com>
+
+       * config/rs6000/rs6000.c (rs6000_secondary_reload_direct_move):
+       Delete duplicated code.
+
 2016-08-02  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR middle-end/72778
index c16863d0ad63949d84857480f91bab5c1a6cb93e..5b9aae2768112246390412a07ac065ae780870da 100644 (file)
@@ -19599,50 +19599,11 @@ rs6000_secondary_reload_direct_move (enum rs6000_reg_type to_type,
   int cost = 0;
   int size = GET_MODE_SIZE (mode);
 
-  if (TARGET_POWERPC64)
-    {
-      if (size == 16)
-       {
-         /* Handle moving 128-bit values from GPRs to VSX point registers on
-            ISA 2.07 (power8, power9) when running in 64-bit mode using
-            XXPERMDI to glue the two 64-bit values back together.  */
-         if (to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE)
-           {
-             cost = 3;                 /* 2 mtvsrd's, 1 xxpermdi.  */
-             icode = reg_addr[mode].reload_vsx_gpr;
-           }
-
-         /* Handle moving 128-bit values from VSX point registers to GPRs on
-            ISA 2.07 when running in 64-bit mode using XXPERMDI to get access to the
-            bottom 64-bit value.  */
-         else if (to_type == GPR_REG_TYPE && from_type == VSX_REG_TYPE)
-           {
-             cost = 3;                 /* 2 mfvsrd's, 1 xxpermdi.  */
-             icode = reg_addr[mode].reload_gpr_vsx;
-           }
-       }
-
-      else if (mode == SFmode)
-       {
-         if (to_type == GPR_REG_TYPE && from_type == VSX_REG_TYPE)
-           {
-             cost = 3;                 /* xscvdpspn, mfvsrd, and.  */
-             icode = reg_addr[mode].reload_gpr_vsx;
-           }
-
-         else if (to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE)
-           {
-             cost = 2;                 /* mtvsrz, xscvspdpn.  */
-             icode = reg_addr[mode].reload_vsx_gpr;
-           }
-       }
-    }
-
   if (TARGET_POWERPC64 && size == 16)
     {
       /* Handle moving 128-bit values from GPRs to VSX point registers on
-        ISA 2.07 when running in 64-bit mode using XXPERMDI to glue the two
-        64-bit values back together.  */
+        ISA 2.07 (power8, power9) when running in 64-bit mode using
+        XXPERMDI to glue the two 64-bit values back together.  */
       if (to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE)
        {
          cost = 3;                     /* 2 mtvsrd's, 1 xxpermdi.  */
@@ -19659,6 +19620,21 @@ rs6000_secondary_reload_direct_move (enum rs6000_reg_type to_type,
        }
     }
 
+  else if (TARGET_POWERPC64 && mode == SFmode)
+    {
+      if (to_type == GPR_REG_TYPE && from_type == VSX_REG_TYPE)
+       {
+         cost = 3;                     /* xscvdpspn, mfvsrd, and.  */
+         icode = reg_addr[mode].reload_gpr_vsx;
+       }
+
+      else if (to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE)
+       {
+         cost = 2;                     /* mtvsrz, xscvspdpn.  */
+         icode = reg_addr[mode].reload_vsx_gpr;
+       }
+    }
+
   else if (!TARGET_POWERPC64 && size == 8)
     {
       /* Handle moving 64-bit values from GPRs to floating point registers on