2014-06-20 Martin Jambor <mjambor@suse.cz>
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jun 2014 09:54:39 +0000 (09:54 +0000)
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jun 2014 09:54:39 +0000 (09:54 +0000)
PR ipa/61211
* cgraph.c (clone_of_p): Allow skipped_branch to deal with
expanded clones.

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

gcc/ChangeLog
gcc/cgraph.c

index 7387708..6b66a35 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-20  Martin Jambor  <mjambor@suse.cz>
+
+       PR ipa/61211
+       * cgraph.c (clone_of_p): Allow skipped_branch to deal with
+       expanded clones.
+
 2014-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/aarch64/iterators.md (VCOND): Handle SI and HI modes.
index 610bf67..afd41b7 100644 (file)
@@ -2563,11 +2563,16 @@ clone_of_p (struct cgraph_node *node, struct cgraph_node *node2)
       skipped_thunk = true;
     }
 
-  if (skipped_thunk
-      && (!node2->clone_of
-         || !node2->clone.args_to_skip
-         || !bitmap_bit_p (node2->clone.args_to_skip, 0)))
-    return false;
+  if (skipped_thunk)
+    {
+      if (!node2->clone.args_to_skip
+         || !bitmap_bit_p (node2->clone.args_to_skip, 0))
+       return false;
+      if (node2->former_clone_of == node->decl)
+       return true;
+      else if (!node2->clone_of)
+       return false;
+    }
 
   while (node != node2 && node2)
     node2 = node2->clone_of;