IPA ICF: make algorithm stable to survive -fcompare-debug
authorMartin Liska <mliska@suse.cz>
Tue, 10 Jan 2017 14:39:33 +0000 (15:39 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 10 Jan 2017 14:39:33 +0000 (14:39 +0000)
2017-01-10  Martin Liska  <mliska@suse.cz>

* gcc.dg/ipa/ipa-icf-1.c: Change scanned pattern.
* gcc.dg/ipa/ipa-icf-10.c: Likewise.
* gcc.dg/ipa/ipa-icf-11.c: Likewise.
* gcc.dg/ipa/ipa-icf-12.c: Likewise.
* gcc.dg/ipa/ipa-icf-13.c: Likewise.
* gcc.dg/ipa/ipa-icf-16.c: Likewise.
* gcc.dg/ipa/ipa-icf-18.c: Likewise.
* gcc.dg/ipa/ipa-icf-2.c: Likewise.
* gcc.dg/ipa/ipa-icf-20.c: Likewise.
* gcc.dg/ipa/ipa-icf-21.c: Likewise.
* gcc.dg/ipa/ipa-icf-23.c: Likewise.
* gcc.dg/ipa/ipa-icf-25.c: Likewise.
* gcc.dg/ipa/ipa-icf-26.c: Likewise.
* gcc.dg/ipa/ipa-icf-27.c: Likewise.
* gcc.dg/ipa/ipa-icf-3.c: Likewise.
* gcc.dg/ipa/ipa-icf-35.c: Likewise.
* gcc.dg/ipa/ipa-icf-36.c: Likewise.
* gcc.dg/ipa/ipa-icf-37.c: Likewise.
* gcc.dg/ipa/ipa-icf-5.c: Likewise.
* gcc.dg/ipa/ipa-icf-7.c: Likewise.
* gcc.dg/ipa/ipa-icf-8.c: Likewise.
* gcc.dg/ipa/pr64307.c: Likewise.
* gcc.dg/ipa/pr77653.c: Likewise.
2017-01-10  Martin Liska  <mliska@suse.cz>

* ipa-icf.c (sort_sem_items_by_decl_uid): New function.
(sort_congruence_classes_by_decl_uid): Likewise.
(sort_congruence_class_groups_by_decl_uid): Likewise.
(sem_item_optimizer::merge_classes): Sort class, groups in these
classes and members in the groups by DECL_UID of declarations.
This would make merge operations stable.

From-SVN: r244273

26 files changed:
gcc/ChangeLog
gcc/ipa-icf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c
gcc/testsuite/gcc.dg/ipa/pr64307.c
gcc/testsuite/gcc.dg/ipa/pr77653.c

index 9a2649d49e3c881819c14244357e7aa2a9f0f8a8..ab86ebd936ae1b916414e5be868827377f898cc1 100644 (file)
@@ -1,3 +1,12 @@
+2017-01-10  Martin Liska  <mliska@suse.cz>
+
+       * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
+       (sort_congruence_classes_by_decl_uid): Likewise.
+       (sort_congruence_class_groups_by_decl_uid): Likewise.
+       (sem_item_optimizer::merge_classes): Sort class, groups in these
+       classes and members in the groups by DECL_UID of declarations.
+       This would make merge operations stable.
+
 2017-01-10  Martin Liska  <mliska@suse.cz>
 
        * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
index 28de251c42129cd3633415acdd7a98b38ab791bb..c17a677b4592cffa9da6bfa42a4f3a7d908c7fa7 100644 (file)
@@ -3380,6 +3380,66 @@ sem_item_optimizer::dump_cong_classes (void)
   free (histogram);
 }
 
+/* Sort pair of sem_items A and B by DECL_UID.  */
+
+static int
+sort_sem_items_by_decl_uid (const void *a, const void *b)
+{
+  const sem_item *i1 = *(const sem_item * const *)a;
+  const sem_item *i2 = *(const sem_item * const *)b;
+
+  int uid1 = DECL_UID (i1->decl);
+  int uid2 = DECL_UID (i2->decl);
+
+  if (uid1 < uid2)
+    return -1;
+  else if (uid1 > uid2)
+    return 1;
+  else
+    return 0;
+}
+
+/* Sort pair of congruence_classes A and B by DECL_UID of the first member.  */
+
+static int
+sort_congruence_classes_by_decl_uid (const void *a, const void *b)
+{
+  const congruence_class *c1 = *(const congruence_class * const *)a;
+  const congruence_class *c2 = *(const congruence_class * const *)b;
+
+  int uid1 = DECL_UID (c1->members[0]->decl);
+  int uid2 = DECL_UID (c2->members[0]->decl);
+
+  if (uid1 < uid2)
+    return -1;
+  else if (uid1 > uid2)
+    return 1;
+  else
+    return 0;
+}
+
+/* Sort pair of congruence_class_groups A and B by
+   DECL_UID of the first member of a first group.  */
+
+static int
+sort_congruence_class_groups_by_decl_uid (const void *a, const void *b)
+{
+  const congruence_class_group *g1
+    = *(const congruence_class_group * const *)a;
+  const congruence_class_group *g2
+    = *(const congruence_class_group * const *)b;
+
+  int uid1 = DECL_UID (g1->classes[0]->members[0]->decl);
+  int uid2 = DECL_UID (g2->classes[0]->members[0]->decl);
+
+  if (uid1 < uid2)
+    return -1;
+  else if (uid1 > uid2)
+    return 1;
+  else
+    return 0;
+}
+
 /* After reduction is done, we can declare all items in a group
    to be equal. PREV_CLASS_COUNT is start number of classes
    before reduction. True is returned if there's a merge operation
@@ -3397,6 +3457,22 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count)
 
   bool merged_p = false;
 
+  /* PR lto/78211
+     Sort functions in congruence classes by DECL_UID and do the same
+     for the classes to not to break -fcompare-debug.  */
+
+  for (hash_table<congruence_class_hash>::iterator it = m_classes.begin ();
+       it != m_classes.end (); ++it)
+    {
+      for (unsigned int i = 0; i < (*it)->classes.length (); i++)
+       {
+         congruence_class *c = (*it)->classes[i];
+         c->members.qsort (sort_sem_items_by_decl_uid);
+       }
+
+      (*it)->classes.qsort (sort_congruence_classes_by_decl_uid);
+    }
+
   for (hash_table<congruence_class_hash>::iterator it = m_classes.begin ();
        it != m_classes.end (); ++it)
     for (unsigned int i = 0; i < (*it)->classes.length (); i++)
@@ -3409,6 +3485,13 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count)
          }
       }
 
+  auto_vec <congruence_class_group *> classes (m_classes.elements ());
+  for (hash_table<congruence_class_hash>::iterator it = m_classes.begin ();
+       it != m_classes.end (); ++it)
+    classes.quick_push (*it);
+
+  classes.qsort (sort_congruence_class_groups_by_decl_uid);
+
   if (dump_file)
     {
       fprintf (dump_file, "\nItem count: %u\n", item_count);
@@ -3426,11 +3509,12 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count)
               item_count ? 100.0f * equal_items / item_count : 0.0f);
     }
 
-  for (hash_table<congruence_class_hash>::iterator it = m_classes.begin ();
-       it != m_classes.end (); ++it)
-    for (unsigned int i = 0; i < (*it)->classes.length (); i++)
+  unsigned int l;
+  congruence_class_group *it;
+  FOR_EACH_VEC_ELT (classes, l, it)
+    for (unsigned int i = 0; i < it->classes.length (); i++)
       {
-       congruence_class *c = (*it)->classes[i];
+       congruence_class *c = it->classes[i];
 
        if (c->members.length () == 1)
          continue;
index c00016d98dc60cdfb2d7a78a3327ac62a4ed6a1c..ecbc8fabadc6743ba9b83cdfe7f2108861827234 100644 (file)
@@ -1,3 +1,29 @@
+2017-01-10  Martin Liska  <mliska@suse.cz>
+
+       * gcc.dg/ipa/ipa-icf-1.c: Change scanned pattern.
+       * gcc.dg/ipa/ipa-icf-10.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-11.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-12.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-13.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-16.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-18.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-2.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-20.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-21.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-23.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-25.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-26.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-27.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-3.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-35.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-36.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-37.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-5.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-7.c: Likewise.
+       * gcc.dg/ipa/ipa-icf-8.c: Likewise.
+       * gcc.dg/ipa/pr64307.c: Likewise.
+       * gcc.dg/ipa/pr77653.c: Likewise.
+
 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
 
        * g++.dg/other/i386-2.C: Add -mavx512vpopcntdq.
index af86b9b8d5050ddf51b10de68b382f58c2bc5a81..a3d88585a9e57c3218511f4897c82d6d59e987c2 100644 (file)
@@ -56,5 +56,5 @@ int main(int argc, char **argv)
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:x2->x1" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:x1->x2" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 6a2dd0088493789355d9a0b4b4bf052dc691f7cf..5f76c1d87e739ee8512bd1c384fffa22c0ed0540 100644 (file)
@@ -29,5 +29,5 @@ int main(int argc, char **argv)
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:funkce->ferda" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:ferda->funkce" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 33b62ca6eb7ac36b25f0cc28a6bcd2b5f7d90eda..2610af9e55cb599933564dcf2cfa4d16e41bf5aa 100644 (file)
@@ -24,5 +24,5 @@ int main(int argc, char **argv)
   return f0(argc) * f1(argc);
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f0" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:f0->f1" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 8c03a47431bb6e6bffd63716f1e54b06173a16ac..8e4aa56b032f217b46e4db060c65d425fee8234e 100644 (file)
@@ -73,5 +73,5 @@ int main(int argc, char **argv)
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd->gcd" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd->nsd" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index dd3f262146f3ba811fb5149b2fb60a02ac915fbe..09d817c4030b5aa1c4f8b4fd43f1d0602c81877c 100644 (file)
@@ -187,7 +187,7 @@ int main(int argc, char **argv)
   printf("Test2: %d, %d, gdc: %d\n", a, b, nsd(a, b));
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:s2->s1" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd_different_result2->nsd_different_result" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd->gcd" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:s1->s2" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd_different_result->nsd_different_result2" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd->nsd" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 3" "icf"  } } */
index 6f038f13cf90502b2da07eefb49e95f8dcd010ee..a2613af5dd5e80b4ee65a6bdae2a834c13bb438b 100644 (file)
@@ -22,5 +22,5 @@ int main()
   return foo() + bar();
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index a8e28c1ff3ae050f4bfe9da9c347154e44e672c9..e246c2b340421264251fe69d57af0fddc7951d57 100644 (file)
@@ -32,5 +32,5 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 4d3cbafff4a642ffa176376aaf0035352f405e43..983e3d818d0c3d4da1886f019dac21d3e5741c2e 100644 (file)
@@ -64,5 +64,5 @@ int main(int argc, char **argv)
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:f2->f1" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 470e466ba233c3cacda0438218cf04b79f6a9aa0..46dc70492f0c5708969fb629c7590df2a8d37327 100644 (file)
@@ -23,5 +23,5 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 447fd7bad51f417923e26292761dd8b6eb402e19..a20b4a43ffe156a6ff314f672a5716d810980b29 100644 (file)
@@ -22,5 +22,5 @@ int main()
   return 2;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 7787f06938ede3176685fbccb70b701cf07deb3a..02bb138c28d369517713f354924243c7d48d75be 100644 (file)
@@ -24,5 +24,5 @@ int main()
   return foo(0) + bar(0);
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 7e42052fe20d24b741ee7410979c4611427168f6..4b364eb7c72af2864d38a43d405702989ae84d11 100644 (file)
@@ -46,6 +46,6 @@ int main()
   return foo() + bar();
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:zap->zip" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:zip->zap" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 2" "icf"  } } */
index f3bb675d82a9780764dbb1c6b66c5bad9ccac77b..325ece1befa1e0355d093e38c68739777f11a708 100644 (file)
@@ -38,5 +38,5 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:remove->destroy" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:destroy->remove" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 7265ee4035e81599cc0d203f67d509616cef8bfd..bc49e58cb95ddd17ff9f850d2df9835f5b7136b8 100644 (file)
@@ -25,5 +25,5 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:remove->destroy" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:destroy->remove" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 6418acea19c850e7de641b7424de06179def8ccb..2ecab2335c24999f62eaa024bc71590dd052cee7 100644 (file)
@@ -31,5 +31,5 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index ace6ae2b353e1dbeb8c1107f879f9f986a6282c9..d194f918fd0942ca7d74654bda8f9a455bb221b1 100644 (file)
@@ -25,6 +25,6 @@ int main()
 }
 
 /* { dg-final { scan-ipa-dump "Equal symbols: 3" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:f2->f1" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:d->c" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:b->a" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf"  } } */
index d8cd5c8567ef8e8b66317f49c51de20a7601062e..5d125d0e1b701b3a317a505394a50757cb82e679 100644 (file)
@@ -29,8 +29,8 @@ int t(int tt)
   }
 }
 /* { dg-final { scan-ipa-dump "Equal symbols: 6" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:b->a" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:d->c" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:f->e" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:h->g" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:k->i" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:e->f" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:g->h" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:i->k" "icf"  } } */
index 7314697e887ff60760d375b30adf23a8e3dd6825..5c02e8ec33603e6e42fb431571c7b39626d767eb 100644 (file)
@@ -29,8 +29,8 @@ int t(int tt)
   }
 }
 /* { dg-final { scan-ipa-dump "Equal symbols: 5" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:b->a" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:d->c" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:f->e" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:h->g" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Semantic equality hit:j->i" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:e->f" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:g->h" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:i->j" "icf"  } } */
index bef80f27f6501fad83f36e48ebad1664a72b8ab6..b2d48f9d79dffbfc7e82008c283015b50d300395 100644 (file)
@@ -51,5 +51,5 @@ int main()
   return 1;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:f2->f1" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 862dd70d50ce67e3ab932b280faac836a3496240..488e133d93f72a2be7c0ea68a5c3c0e034b20532 100644 (file)
@@ -68,5 +68,5 @@ int main()
   return 1;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:foo2->foo" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->foo2" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 32eed406d532675641dd51045cea3153fdc66007..8ee46d034e712394e875e5cc3ad23d032874920e 100644 (file)
@@ -40,5 +40,5 @@ int main(int argc, char **argv)
   printf("fce2: %d\n", fce2(argc, 2 * argc));
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:fce2->fce1" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:fce1->fce2" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 87537c6113f6705cef868845a17e4de5bac7fe10..79d93af6eb7a903e6d168f13294ec7f3cf7d1443 100644 (file)
@@ -27,5 +27,5 @@ int main()
   return r1 - r2;
 }
 
-/* { dg-final { scan-ipa-dump "Semantic equality hit:real_part_2->real_part" "icf"  } } */
+/* { dg-final { scan-ipa-dump "Semantic equality hit:real_part->real_part_2" "icf"  } } */
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
index 16ae510bbb08f0f2b46392d4f44cd69adde02d19..f508815a3fbbbb8461b993903362d90962b7734f 100644 (file)
@@ -21,4 +21,4 @@ int main ()
 }
 
 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
-/* { dg-final { scan-ipa-dump "Not unifying; address of original may be compared." "icf"  } } */
+/* { dg-final { scan-ipa-dump "Not unifying; alias cannot be created; target is discardable" "icf"  } } */