rs6000.c (rs6000_rtx_costs): Add CLZ, CTZ, and POPCOUNT.
authorDavid Edelsohn <edelsohn@gnu.org>
Thu, 16 Aug 2007 00:40:27 +0000 (00:40 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Thu, 16 Aug 2007 00:40:27 +0000 (20:40 -0400)
        * config/rs6000/rs6000.c (rs6000_rtx_costs): Add CLZ, CTZ, and
        POPCOUNT.

From-SVN: r127532

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

index 5e0cfc0f3ef3d425179c8b734fb7a831ff72c9a9..0629abd93020e57dfdb621dbbecb57bc12e34627 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-15  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/rs6000.c (rs6000_rtx_costs): Add CLZ, CTZ, and
+       POPCOUNT.
+
 2007-08-15  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * config/rs6000/rs6000.c (rs6000_file_start): Output a .gnu_attribute
index e910276676695db3edd899b40602951aeedf6f70..5354e525200b7d92342cbe704f1c712549058853 100644 (file)
@@ -20298,10 +20298,15 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total)
        *total += COSTS_N_INSNS (2);
       return false;
 
+    case CTZ:
     case FFS:
       *total = COSTS_N_INSNS (4);
       return false;
 
+    case POPCOUNT:
+      *total = COSTS_N_INSNS (6);
+      return false;
+
     case NOT:
       if (outer_code == AND || outer_code == IOR || outer_code == XOR)
        {
@@ -20311,6 +20316,7 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total)
       /* FALLTHRU */
 
     case AND:
+    case CLZ:
     case IOR:
     case XOR:
     case ZERO_EXTRACT: