]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (ix86_parse_stringop_strategy_string): Remove variable alg.
authorMarek Polacek <polacek@redhat.com>
Thu, 19 Dec 2013 10:25:34 +0000 (10:25 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 19 Dec 2013 10:25:34 +0000 (10:25 +0000)
* config/i386/i386.c (ix86_parse_stringop_strategy_string): Remove
variable alg.  Use index variable i directly.

From-SVN: r206108

gcc/ChangeLog
gcc/config/i386/i386.c

index e4bb6b724ed091f8b27d4f576dc6c4bfb8d549eb..13bb35aedcae51d6a9578b060d34568830a4645b 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-19  Marek Polacek  <polacek@redhat.com>
+
+       * config/i386/i386.c (ix86_parse_stringop_strategy_string): Remove
+       variable alg.  Use index variable i directly.
+
 2013-12-19  Eric Botcazou  <ebotcazou@adacore.com>
 
        * print-tree.c (print_node) <case tcc_type>: Print no_force_blk_flag
index 0be671da3902918e645a898692e6b691c95ca385..862231bf80c60d1ac269e7dcfd66db3c496b0e93 100644 (file)
@@ -2856,7 +2856,6 @@ ix86_parse_stringop_strategy_string (char *strategy_str, bool is_memset)
   do
     {
       int maxs;
-      stringop_alg alg;
       char alg_name[128];
       char align[16];
       next_range_str = strchr (curr_range_str, ',');
@@ -2879,13 +2878,8 @@ ix86_parse_stringop_strategy_string (char *strategy_str, bool is_memset)
         }
 
       for (i = 0; i < last_alg; i++)
-        {
-          if (!strcmp (alg_name, stringop_alg_names[i]))
-            {
-              alg = (stringop_alg) i;
-              break;
-            }
-        }
+       if (!strcmp (alg_name, stringop_alg_names[i]))
+         break;
 
       if (i == last_alg)
         {
@@ -2896,7 +2890,7 @@ ix86_parse_stringop_strategy_string (char *strategy_str, bool is_memset)
         }
 
       input_ranges[n].max = maxs;
-      input_ranges[n].alg = alg;
+      input_ranges[n].alg = (stringop_alg) i;
       if (!strcmp (align, "align"))
         input_ranges[n].noalign = false;
       else if (!strcmp (align, "noalign"))