tree-vect-data-refs.c (vect_peeling_hash_get_most_frequent): Take number of iteration...
authorIra Rosen <ira.rosen@linaro.org>
Sun, 12 Jun 2011 06:37:49 +0000 (06:37 +0000)
committerIra Rosen <irar@gcc.gnu.org>
Sun, 12 Jun 2011 06:37:49 +0000 (06:37 +0000)
        * tree-vect-data-refs.c (vect_peeling_hash_get_most_frequent):
        Take number of iterations to peel into account for equally
        frequent misalignment values.

From-SVN: r174965

gcc/ChangeLog
gcc/tree-vect-data-refs.c

index 57b374d8ede543b9021b3f3ed1961d4feb39d399..a1dd32d885e00450807e54818ed02ed5ca2073fe 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-12  Ira Rosen  <ira.rosen@linaro.org>
+
+       * tree-vect-data-refs.c (vect_peeling_hash_get_most_frequent):
+       Take number of iterations to peel into account for equally frequent
+       misalignment values.
+
 2011-06-11  Jan Hubicka  <jh@suse.cz>
 
        * lto-streamer-out.c (produce_symtab): Stream out the newly represented
index 5023710f1e583bde3c151d7feb5ef18a704e9218..c98eb13b225c5b0714696eb8be1fde0e3c01ceb6 100644 (file)
@@ -1248,7 +1248,9 @@ vect_peeling_hash_get_most_frequent (void **slot, void *data)
   vect_peel_info elem = (vect_peel_info) *slot;
   vect_peel_extended_info max = (vect_peel_extended_info) data;
 
-  if (elem->count > max->peel_info.count)
+  if (elem->count > max->peel_info.count
+      || (elem->count == max->peel_info.count
+          && max->peel_info.npeel > elem->npeel))
     {
       max->peel_info.npeel = elem->npeel;
       max->peel_info.count = elem->count;